mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13: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:
parent
220ee9281f
commit
c84e73bf92
4 changed files with 14 additions and 6 deletions
|
@ -1325,6 +1325,9 @@ void ScriptEditor::_menu_option(int p_option) {
|
|||
case HELP_SEARCH_FIND_NEXT: {
|
||||
help->search_again();
|
||||
} break;
|
||||
case HELP_SEARCH_FIND_PREVIOUS: {
|
||||
help->search_again(true);
|
||||
} break;
|
||||
case FILE_CLOSE: {
|
||||
_close_current_tab();
|
||||
} break;
|
||||
|
@ -2827,6 +2830,7 @@ void ScriptEditor::_update_selected_editor_menu() {
|
|||
|
||||
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find", TTR("Find..."), KEY_MASK_CMD | KEY_F), HELP_SEARCH_FIND);
|
||||
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_next", TTR("Find Next"), KEY_F3), HELP_SEARCH_FIND_NEXT);
|
||||
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_previous", TTR("Find Previous"), KEY_MASK_SHIFT | KEY_F3), HELP_SEARCH_FIND_PREVIOUS);
|
||||
script_search_menu->get_popup()->add_separator();
|
||||
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_in_files", TTR("Find in Files"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F), SEARCH_IN_FILES);
|
||||
script_search_menu->show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue