You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix editor infinit loop in search_prev
Fixes godotengine#31328
This commit is contained in:
@@ -366,14 +366,12 @@ bool FindReplaceBar::search_prev() {
|
||||
if (text_edit->is_selection_active())
|
||||
col--; // Skip currently selected word.
|
||||
|
||||
if (line == result_line && col == result_col) {
|
||||
col -= text.length();
|
||||
if (col < 0) {
|
||||
line -= 1;
|
||||
if (line < 0)
|
||||
line = text_edit->get_line_count() - 1;
|
||||
col = text_edit->get_line(line).length();
|
||||
}
|
||||
col -= text.length();
|
||||
if (col < 0) {
|
||||
line -= 1;
|
||||
if (line < 0)
|
||||
line = text_edit->get_line_count() - 1;
|
||||
col = text_edit->get_line(line).length();
|
||||
}
|
||||
|
||||
return _search(flags, line, col);
|
||||
|
||||
Reference in New Issue
Block a user