diff options
| author | Sebastian Herrlinger <[email protected]> | 2025-12-12 22:43:43 +0100 |
|---|---|---|
| committer | Sebastian Herrlinger <[email protected]> | 2025-12-12 22:45:28 +0100 |
| commit | 43202f2820d64f55b710c9257b73888c3954cf4e (patch) | |
| tree | 03901702aaacb94f2053be9c6b06e2549f52803d | |
| parent | ce37e11bfea70d02793c960da06f856fc5221c9b (diff) | |
| download | opencode-43202f2820d64f55b710c9257b73888c3954cf4e.tar.gz opencode-43202f2820d64f55b710c9257b73888c3954cf4e.zip | |
only exit app when prompt is empty, otherwise fallthrough, fix #5457
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx index 669ed1897..1ea701c83 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -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") |
