summaryrefslogtreecommitdiff
path: root/editor/code_editor.cpp
diff options
context:
space:
mode:
authorSushi <weingaben@gmail.com>2021-04-04 17:26:54 +0200
committerSushi <weingaben@gmail.com>2021-04-07 16:38:22 +0200
commita4d56648580fd06cf54c5bc6d8e4a6a635aeaf03 (patch)
tree5cab4ba835aebc19863214393859ef9343cc3e96 /editor/code_editor.cpp
parent47aef8e8dcc61b505777a84e31a507ee555d188f (diff)
Fix: Selection Only in Find/Replace now preserves selection
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r--editor/code_editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index ac8bef817b..6ed2cb9d9c 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -142,7 +142,7 @@ bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col)
bool found = text_editor->search(text, p_flags, p_from_line, p_from_col, line, col);
if (found) {
- if (!preserve_cursor) {
+ if (!preserve_cursor && !is_selection_only()) {
text_editor->unfold_line(line);
text_editor->cursor_set_line(line, false);
text_editor->cursor_set_column(col + text.length(), false);