From 01b583957eb60b00cece0191d715c15f91817beb Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 6 Jun 2013 10:15:33 +0800 Subject: [PATCH] Add back edit menu. On OS X, applications rely on the menu to trigger native events for various commands. Editor view doesn't need it before it listens to the keyboard shortcuts itself. Since spec window and devtools view don't listen to keyboard shortcuts, we should rely on the menu to make edit commands work. Fixed atom/atom-shell#18. --- src/atom-application.coffee | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/atom-application.coffee b/src/atom-application.coffee index c607c3e24..8fabee8c4 100644 --- a/src/atom-application.coffee +++ b/src/atom-application.coffee @@ -146,6 +146,18 @@ class AtomApplication { label: 'Open...', accelerator: 'Command+O', click: => @promptForPath() } ] + menus.push + label: 'Edit' + submenu:[ + { label: 'Undo', accelerator: 'Command+Z', selector: 'undo:' } + { label: 'Redo', accelerator: 'Command+Shift+Z', selector: 'redo:' } + { type: 'separator' } + { label: 'Cut', accelerator: 'Command+X', selector: 'cut:' } + { label: 'Copy', accelerator: 'Command+C', selector: 'copy:' } + { label: 'Paste', accelerator: 'Command+V', selector: 'paste:' } + { label: 'Select All', accelerator: 'Command+A', selector: 'selectAll:' } + ] + menus.push label: 'View' submenu:[