summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2023-01-29 02:25:11 +0100
committerGitHub <noreply@github.com>2023-01-29 02:25:11 +0100
commitd866d6cd1bc79539a793611afa1ea8cf6cce2e6e (patch)
tree1e53317978cd345f090c16dcc74ae74f03eaef30
parent0d36281dff0255313150b3ea3b97467ebe58d0fb (diff)
parent8cb05a5e53a59805349a83ff1bf600037938bb51 (diff)
Merge pull request #72261 from Paulb23/preserve-carets-search
Fixed removing secondary carets when editing with search open
-rw-r--r--editor/code_editor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 644735a4d8..28d687488c 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -143,7 +143,9 @@ void FindReplaceBar::unhandled_input(const Ref<InputEvent> &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);