Skip to content

Commit f88a744

Browse files
committed
Make Cmd+. always work
1 parent 1f38bd0 commit f88a744

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/mainMenu.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,22 @@ export function createMainMenu(actions: MenuActions): Menu {
102102
type: "separator",
103103
},
104104
{
105+
enabled: false,
105106
id: Command.AbortGraphing,
106107
label: "A&bort Graphing",
107108
accelerator: "CmdOrCtrl+.",
108109
click: actions[Command.AbortGraphing],
109110
},
111+
// This is a workaround for an issue where the keybinding for the "Abort Graphing" menu
112+
// does not work if the menu item was disabled when the menu was last opened.
113+
{
114+
id: `${Command.AbortGraphing}-hidden`,
115+
label: "Abort Graphing (Hidden)",
116+
accelerator: "CmdOrCtrl+.",
117+
acceleratorWorksWhenHidden: true,
118+
click: actions[Command.AbortGraphing],
119+
visible: false,
120+
},
110121
],
111122
},
112123
{

0 commit comments

Comments
 (0)