Merge pull request #32040 from Calinou/editor-help-shift-find-previous

Find the previous match in the editor help when pressing Shift + Enter
This commit is contained in:
Rémi Verschelde 2019-09-23 09:44:06 +02:00 committed by GitHub
commit 16bedc7ede
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -30,6 +30,7 @@
#include "editor_help.h" #include "editor_help.h"
#include "core/os/input.h"
#include "core/os/keyboard.h" #include "core/os/keyboard.h"
#include "doc_data_compressed.gen.h" #include "doc_data_compressed.gen.h"
#include "editor/plugins/script_editor_plugin.h" #include "editor/plugins/script_editor_plugin.h"
@ -1807,5 +1808,9 @@ void FindBar::_search_text_changed(const String &p_text) {
void FindBar::_search_text_entered(const String &p_text) { void FindBar::_search_text_entered(const String &p_text) {
search_next(); if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
search_prev();
} else {
search_next();
}
} }