1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fix find result current match count

This commit is contained in:
kit
2024-06-27 14:04:40 -04:00
parent cae2f853dc
commit 17c8e8b2b4
2 changed files with 44 additions and 17 deletions

View File

@@ -64,6 +64,12 @@ class CodeTextEditor;
class FindReplaceBar : public HBoxContainer {
GDCLASS(FindReplaceBar, HBoxContainer);
enum SearchMode {
SEARCH_CURRENT,
SEARCH_NEXT,
SEARCH_PREV,
};
LineEdit *search_text = nullptr;
Label *matches_label = nullptr;
Button *find_prev = nullptr;
@@ -94,7 +100,7 @@ class FindReplaceBar : public HBoxContainer {
bool replace_all_mode = false;
bool preserve_cursor = false;
void _get_search_from(int &r_line, int &r_col, bool p_is_searching_next = false);
void _get_search_from(int &r_line, int &r_col, SearchMode p_search_mode);
void _update_results_count();
void _update_matches_display();