summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-17 11:56:52 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-17 11:56:52 +0100
commit74590e9597b670a63cc90e38ea0403e0c7ae2f1f (patch)
tree57f742b2cd03fc7a1aa464f81c58dc9855cb165c /editor
parent2b9a0aac3eb4a2c5770d04ef41f43aeb4f96aa6c (diff)
parent5347c2b10e7f5d61fd7714f4c848d45803b250f5 (diff)
Merge pull request #68651 from ClarkThyLord/fix_code_editor_search_match_inconsistencies
Fix code editor search match inconsistencies
Diffstat (limited to 'editor')
-rw-r--r--editor/code_editor.cpp8
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;
}
}