Merge pull request #47625 from SushiJackal/47450_fix

Fix: Selection Only in Find/Replace now preserves selection
This commit is contained in:
Rémi Verschelde 2021-04-14 08:24:38 +02:00 committed by GitHub
commit fe73fed4d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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); bool found = text_editor->search(text, p_flags, p_from_line, p_from_col, line, col);
if (found) { if (found) {
if (!preserve_cursor) { if (!preserve_cursor && !is_selection_only()) {
text_editor->unfold_line(line); text_editor->unfold_line(line);
text_editor->cursor_set_line(line, false); text_editor->cursor_set_line(line, false);
text_editor->cursor_set_column(col + text.length(), false); text_editor->cursor_set_column(col + text.length(), false);