Merge pull request #27716 from Calinou/script-editor-shift-find-previous

Find the previous match in script editor when pressing Shift + Enter
This commit is contained in:
Rémi Verschelde 2019-04-08 12:25:28 +02:00 committed by GitHub
commit 9d4623f994
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {