From 79f48642a8f6fec63f5624083f5295e85e161e83 Mon Sep 17 00:00:00 2001 From: Sushi Date: Sun, 4 Apr 2021 17:26:54 +0200 Subject: [PATCH] Fix: Selection Only in Find/Replace now preserves selection (cherry picked from commit a4d56648580fd06cf54c5bc6d8e4a6a635aeaf03) --- editor/code_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index c3cbc841e4b..691371a1888 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -147,7 +147,7 @@ bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col) bool found = text_edit->search(text, p_flags, p_from_line, p_from_col, line, col); if (found) { - if (!preserve_cursor) { + if (!preserve_cursor && !is_selection_only()) { text_edit->unfold_line(line); text_edit->cursor_set_line(line, false); text_edit->cursor_set_column(col + text.length(), false);