diff options
author | Dominik 'squ@ll' Jasiński <dominikjasinski@o2.pl> | 2020-02-08 21:46:04 +0100 |
---|---|---|
committer | Dominik 'squ@ll' Jasiński <dominikjasinski@o2.pl> | 2020-02-08 21:46:04 +0100 |
commit | 1adcd57377a4364e0c5f28d7aa929ac98827eb9d (patch) | |
tree | 4534266c1339945c1eed8c52dfb0ee5c50b825f9 | |
parent | 42f04cbc1a59772a5f7eca9c6847fa349b23a70e (diff) |
Allow using Enter key for replacing text in code editors (also Shift + Enter works backwards)
Fixes issue #31762
-rw-r--r-- | editor/code_editor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index e05ace53da..e785c52732 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -517,6 +517,11 @@ void FindReplaceBar::_replace_text_entered(const String &p_text) { if (selection_only->is_pressed() && text_edit->is_selection_active()) { _replace_all(); _hide_bar(); + } else if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + _replace(); + search_prev(); + } else { + _replace(); } } |