terminal split bug

This commit is contained in:
Neil
2026-03-18 18:52:04 -07:00
parent 9d8e85963a
commit d89a12ba01
+10 -1
View File
@@ -469,7 +469,7 @@ export default function TerminalPane({
root: container,
createInitialPane: false,
autoInit: false,
shortcuts: { enabled: true },
shortcuts: { enabled: false },
defaultContextMenu: false,
appOptions: ({ id }) => {
const onExit = (): void => {
@@ -671,6 +671,15 @@ export default function TerminalPane({
toggleExpandPane(pane.id)
return
}
// Cmd+D / Cmd+Shift+D split the active pane in the focused tab only.
if (e.key.toLowerCase() === 'd') {
e.preventDefault()
e.stopPropagation()
const pane = restty.getActivePane() ?? restty.getPanes()[0]
if (!pane) return
restty.splitPane(pane.id, e.shiftKey ? 'horizontal' : 'vertical')
}
}
window.addEventListener('keydown', onKeyDown, { capture: true })