From 8cb05a5e53a59805349a83ff1bf600037938bb51 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sat, 28 Jan 2023 16:08:10 +0000 Subject: [PATCH] Fixed removing secondary carets when editing with search open --- editor/code_editor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 644735a4d88a..28d687488ced 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -143,7 +143,9 @@ void FindReplaceBar::unhandled_input(const Ref &p_event) { } bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col) { - text_editor->remove_secondary_carets(); + if (!preserve_cursor) { + text_editor->remove_secondary_carets(); + } String text = get_search_text(); Point2i pos = text_editor->search(text, p_flags, p_from_line, p_from_col);