Skip to content

Commit

Permalink
fix: in electron mode, ctrl/cmd+w should always close kui tab
Browse files Browse the repository at this point in the history
  • Loading branch information
myan9 authored and k8s-ci-robot committed May 28, 2021
1 parent 5c339e9 commit caada90
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/main/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const newSplit = () => tellRendererToExecute('split')
* tell the current window to close the current tab
*
*/
const closeTab = () => tellRendererToExecute('tab close')
const closeTab = () => tellRendererToExecute('tab close -A')

const isDarwin = process.platform === 'darwin'
const closeAccelerator = isDarwin ? 'Command+W' : 'Control+Shift+W'
Expand Down
5 changes: 0 additions & 5 deletions plugins/plugin-core-support/src/lib/cmds/quit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ const usage = (command: string) => ({

export default (commandTree: Registrar) => {
if (!inBrowser()) {
commandTree.listen('/quit', doQuit, {
usage: usage('quit')
})

// register a window close command handler
commandTree.listen('/window/close', () => {
const remote = require('electron').remote
Expand All @@ -44,7 +40,6 @@ export default (commandTree: Registrar) => {
})
}

// just for fun, make /exit a synonym for /quit
commandTree.listen('/exit', doQuit, {
usage: usage('exit')
})
Expand Down

0 comments on commit caada90

Please sign in to comment.