Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 37c7e8c

Browse files
committed
fix: cmd+w fails to close window with only one tab
Regression from 9254
1 parent b8c7b7c commit 37c7e8c

File tree

1 file changed

+6
-0
lines changed
  • plugins/plugin-core-support/src/lib/cmds

1 file changed

+6
-0
lines changed

plugins/plugin-core-support/src/lib/cmds/quit.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,11 @@
2222
import type { Arguments, Registrar } from '@kui-shell/core'
2323

2424
export default (commandTree: Registrar) => {
25+
// register a window close command handler
26+
commandTree.listen('/window/close', () => {
27+
window.close()
28+
return true
29+
})
30+
2531
commandTree.listen('/exit', ({ REPL }: Arguments) => REPL.qexec('tab close'))
2632
}

0 commit comments

Comments
 (0)