summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-14 07:23:49 +0100
committerGitHub <noreply@github.com>2020-02-14 07:23:49 +0100
commit94bf1a8a9d329baa51f3f80efb2bfcd4e3a0a1bd (patch)
tree27c44e2436702545e359be3eea90da62eba667b0
parent664bd919b025c6e4c2eda715ff1699cd0e89f457 (diff)
parent1adcd57377a4364e0c5f28d7aa929ac98827eb9d (diff)
Merge pull request #36030 from dreamsComeTrue/fix-replace-text-entered
Allow using Enter key for replacing text in code editors
-rw-r--r--editor/code_editor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index f3da1b59b2..e898bc54dd 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();
}
}