summaryrefslogtreecommitdiffstats
path: root/scene/gui/text_edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r--scene/gui/text_edit.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 0ed2487e5e..f15fb71f87 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -3898,11 +3898,9 @@ bool TextEdit::search(const String &p_key, uint32_t p_search_flags, int p_from_l
//search through the whole documment, but start by current line
- int line = -1;
+ int line = p_from_line;
int pos = -1;
- line = p_from_line;
-
for (int i = 0; i < text.size() + 1; i++) {
//backwards is broken...
//int idx=(p_search_flags&SEARCH_BACKWARDS)?(text.size()-i):i; //do backwards seearch