only exit app when prompt is empty, otherwise fallthrough, fix #5457

pull/5459/head
Sebastian Herrlinger 2025-12-12 22:43:43 +01:00
parent ce37e11bfe
commit 43202f2820
1 changed files with 6 additions and 2 deletions

View File

@ -732,8 +732,12 @@ export function Prompt(props: PromptProps) {
return
}
if (keybind.match("app_exit", e)) {
await exit()
return
if (store.prompt.input === "") {
await exit()
// Don't preventDefault - let textarea potentially handle the event
e.preventDefault()
return
}
}
if (e.name === "!" && input.visualCursor.offset === 0) {
setStore("mode", "shell")