You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix whole word search slowdown in editor
Reduce repeated iteration through the full text when counting the number of occurrences of whole words while searching a file in the editor.
This commit is contained in:
@@ -308,7 +308,7 @@ void FindReplaceBar::_update_results_count() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_whole_words()) {
|
if (is_whole_words()) {
|
||||||
from_pos++; // Making sure we won't hit the same match next time, if we get out via a continue.
|
from_pos = pos + 1; // Making sure we won't hit the same match next time, if we get out via a continue.
|
||||||
if (pos > 0 && !is_symbol(full_text[pos - 1])) {
|
if (pos > 0 && !is_symbol(full_text[pos - 1])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user