fix: app_exit keybind ignored when using <leader> (including default <leader>q)

pull/8151/head
Evan Sosenko 2026-03-22 23:16:29 -07:00
parent 40e4cd27a1
commit 144ebbcb34
No known key found for this signature in database
GPG Key ID: 757C899CECF66FE0
1 changed files with 7 additions and 0 deletions

View File

@ -301,6 +301,13 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
setReady(true)
})
useKeyboard((evt) => {
if (!keybind.match("app_exit", evt)) return
const prompt = promptRef.current?.current
if (prompt && prompt.input !== "") return
exit()
})
useKeyboard((evt) => {
if (!Flag.OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT) return
const sel = renderer.getSelection()