diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/code_editor.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 510dc345bf..1e734bb97f 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -377,10 +377,12 @@ void FindReplaceBar::_update_results_count() { if (is_whole_words()) { if (col_pos > 0 && !is_symbol(line_text[col_pos - 1])) { - break; + col_pos += searched.length(); + continue; } - if (col_pos + line_text.length() < line_text.length() && !is_symbol(line_text[col_pos + searched.length()])) { - break; + if (col_pos + searched.length() < line_text.length() && !is_symbol(line_text[col_pos + searched.length()])) { + col_pos += searched.length(); + continue; } } |