1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Add shortcut Shift + F3 to search pervious in the built-in docs

When using the built-in docs, Godot would not support the shortcut "Shift + F3"
to search for the previous occurrence of the search entry text, thus causing an
inconsistent behaviour when using shortcuts in the "ScriptEditor" compared to
using them in the "ScriptTextEditor".

The previous parameter of the function "EditorHelp::_search()" in the class
"editor_help" seems to be unused, thus replaced with a bool representing to
search for previous search entry text or not. By adding the shortcut to
Godot's "ScriptEditor", this commit now improves Godot's consistensy when
using shortcuts.

Fixes #31147.

Co-Authored-By: Oscar Ferm <oscfer-6@student.ltu.se>
This commit is contained in:
Marqus
2019-10-09 17:41:49 +02:00
parent 220ee9281f
commit c84e73bf92
4 changed files with 14 additions and 6 deletions

View File

@@ -72,9 +72,12 @@ void EditorHelp::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
}
}
void EditorHelp::_search(const String &) {
void EditorHelp::_search(bool p_search_previous) {
find_bar->search_next();
if (p_search_previous)
find_bar->search_prev();
else
find_bar->search_next();
}
void EditorHelp::_class_list_select(const String &p_select) {
@@ -1502,8 +1505,8 @@ String EditorHelp::get_class() {
return edited_class;
}
void EditorHelp::search_again() {
_search(prev_search);
void EditorHelp::search_again(bool p_search_previous) {
_search(p_search_previous);
}
int EditorHelp::get_scroll() const {