diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-08 12:25:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-08 12:25:28 +0200 |
commit | 9d4623f99425ad71f7057d1d2c8a8f01d78df965 (patch) | |
tree | f6c03aea25dcd850b82777ae4ef3c30e6e2df775 | |
parent | 918de768a550b89da0d232f2040fa618bb10e25a (diff) | |
parent | 8a1c5a839090a26e6c859c3f09ba1274540eff9d (diff) |
Merge pull request #27716 from Calinou/script-editor-shift-find-previous
Find the previous match in script editor when pressing Shift + Enter
-rw-r--r-- | editor/code_editor.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 0b06839ecf..134384c167 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -30,6 +30,7 @@ #include "code_editor.h" +#include "core/os/input.h" #include "core/os/keyboard.h" #include "core/string_builder.h" #include "editor/editor_scale.h" @@ -432,7 +433,11 @@ void FindReplaceBar::_search_text_changed(const String &p_text) { void FindReplaceBar::_search_text_entered(const String &p_text) { - search_next(); + if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + search_prev(); + } else { + search_next(); + } } void FindReplaceBar::_replace_text_entered(const String &p_text) { |