Skip to content

Commit 1351d30

Browse files
committed
Merge pull request #101565 from Hilderin/laspencer91/add-lookup-symbol-shortcut
Added shortcut for Lookup Symbol action
2 parents aee6f86 + ba411e9 commit 1351d30

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

editor/plugins/script_text_editor.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -2337,7 +2337,7 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color, bool p
23372337
if (p_color || p_open_docs || p_goto_definition) {
23382338
context_menu->add_separator();
23392339
if (p_open_docs) {
2340-
context_menu->add_item(TTR("Lookup Symbol"), LOOKUP_SYMBOL);
2340+
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_symbol"), LOOKUP_SYMBOL);
23412341
}
23422342
if (p_color) {
23432343
context_menu->add_item(TTR("Pick Color"), EDIT_PICK_COLOR);
@@ -2491,6 +2491,7 @@ void ScriptTextEditor::_enable_code_editor() {
24912491
edit_hb->add_child(goto_menu);
24922492
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_function"), SEARCH_LOCATE_FUNCTION);
24932493
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
2494+
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_symbol"), LOOKUP_SYMBOL);
24942495
goto_menu->get_popup()->add_separator();
24952496

24962497
goto_menu->get_popup()->add_submenu_node_item(TTR("Bookmarks"), bookmarks_menu);
@@ -2675,6 +2676,7 @@ void ScriptTextEditor::register_editor() {
26752676
ED_SHORTCUT_OVERRIDE("script_text_editor/goto_function", "macos", KeyModifierMask::CTRL | KeyModifierMask::META | Key::J);
26762677

26772678
ED_SHORTCUT("script_text_editor/goto_line", TTRC("Go to Line..."), KeyModifierMask::CMD_OR_CTRL | Key::L);
2679+
ED_SHORTCUT("script_text_editor/goto_symbol", TTRC("Lookup Symbol"));
26782680

26792681
ED_SHORTCUT("script_text_editor/toggle_breakpoint", TTRC("Toggle Breakpoint"), Key::F9);
26802682
ED_SHORTCUT_OVERRIDE("script_text_editor/toggle_breakpoint", "macos", KeyModifierMask::META | KeyModifierMask::SHIFT | Key::B);

0 commit comments

Comments
 (0)