Skip to content

Commit

Permalink
Merge branch 'add-shortcut-lookup-symbol' into my-master
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilderin committed Jul 8, 2024
2 parents 0c6b85d + 579c8da commit 6c7752c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/plugins/script_text_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2200,7 +2200,7 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color, bool p
if (p_color || p_open_docs || p_goto_definition) {
context_menu->add_separator();
if (p_open_docs) {
context_menu->add_item(TTR("Lookup Symbol"), LOOKUP_SYMBOL);
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/lookup_symbol"), LOOKUP_SYMBOL);
}
if (p_color) {
context_menu->add_item(TTR("Pick Color"), EDIT_PICK_COLOR);
Expand Down Expand Up @@ -2350,6 +2350,7 @@ void ScriptTextEditor::_enable_code_editor() {
edit_hb->add_child(goto_menu);
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_function"), SEARCH_LOCATE_FUNCTION);
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/lookup_symbol"), LOOKUP_SYMBOL);
goto_menu->get_popup()->add_separator();

goto_menu->get_popup()->add_submenu_node_item(TTR("Bookmarks"), bookmarks_menu);
Expand Down Expand Up @@ -2531,6 +2532,7 @@ void ScriptTextEditor::register_editor() {
ED_SHORTCUT_OVERRIDE("script_text_editor/goto_function", "macos", KeyModifierMask::CTRL | KeyModifierMask::META | Key::J);

ED_SHORTCUT("script_text_editor/goto_line", TTR("Go to Line..."), KeyModifierMask::CMD_OR_CTRL | Key::L);
ED_SHORTCUT("script_text_editor/lookup_symbol", TTR("Lookup Symbol"));

ED_SHORTCUT("script_text_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), Key::F9);
ED_SHORTCUT_OVERRIDE("script_text_editor/toggle_breakpoint", "macos", KeyModifierMask::META | KeyModifierMask::SHIFT | Key::B);
Expand Down

0 comments on commit 6c7752c

Please sign in to comment.