fix(tui): default Ctrl+Z to undo on Windows (#21138)

This commit is contained in:
Luke Parker
2026-04-06 12:38:35 +10:00
committed by GitHub
parent 1777c480a4
commit cfa597b9a1
4 changed files with 61 additions and 2 deletions
+9 -1
View File
@@ -111,7 +111,15 @@ export namespace TuiConfig {
}
}
acc.result.keybinds = Config.Keybinds.parse(acc.result.keybinds ?? {})
const keybinds = { ...(acc.result.keybinds ?? {}) }
if (process.platform === "win32") {
// Native Windows terminals do not support POSIX suspend, so prefer prompt undo.
keybinds.terminal_suspend = "none"
keybinds.input_undo ??= unique(["ctrl+z", ...Config.Keybinds.shape.input_undo.parse(undefined).split(",")]).join(
",",
)
}
acc.result.keybinds = Config.Keybinds.parse(keybinds)
const deps: Promise<void>[] = []
if (acc.result.plugin?.length) {