MCPcopy
hub / github.com/wavetermdev/waveterm / makeEditMenu

Function makeEditMenu

emain/emain-menu.ts:78–126  ·  view source on GitHub ↗
(fullConfig?: FullConfigType)

Source from the content-addressed store, hash-verified

76}
77
78function makeEditMenu(fullConfig?: FullConfigType): Electron.MenuItemConstructorOptions[] {
79 let pasteAccelerator: string;
80 if (unamePlatform === "darwin") {
81 pasteAccelerator = "Command+V";
82 } else {
83 const ctrlVPaste = fullConfig?.settings?.["app:ctrlvpaste"];
84 if (ctrlVPaste == null) {
85 pasteAccelerator = unamePlatform === "win32" ? "Control+V" : "";
86 } else if (ctrlVPaste) {
87 pasteAccelerator = "Control+V";
88 } else {
89 pasteAccelerator = "";
90 }
91 }
92 return [
93 {
94 role: "undo",
95 accelerator: unamePlatform === "darwin" ? "Command+Z" : "",
96 },
97 {
98 role: "redo",
99 accelerator: unamePlatform === "darwin" ? "Command+Shift+Z" : "",
100 },
101 { type: "separator" },
102 {
103 role: "cut",
104 accelerator: unamePlatform === "darwin" ? "Command+X" : "",
105 },
106 {
107 role: "copy",
108 accelerator: unamePlatform === "darwin" ? "Command+C" : "",
109 },
110 {
111 role: "paste",
112 accelerator: pasteAccelerator,
113 },
114 {
115 role: "pasteAndMatchStyle",
116 accelerator: unamePlatform === "darwin" ? "Command+Shift+V" : "",
117 },
118 {
119 role: "delete",
120 },
121 {
122 role: "selectAll",
123 accelerator: unamePlatform === "darwin" ? "Command+A" : "",
124 },
125 ];
126}
127
128function makeFileMenu(
129 numWaveWindows: number,

Callers 1

makeFullAppMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected