From 07f0d9b408494f1c4a57107b521f525762c5fd0c Mon Sep 17 00:00:00 2001 From: Callum Alpass Date: Tue, 3 Nov 2026 08:45:43 +1100 Subject: [PATCH] ctrl+g with the message editor open goes back to it rather than starting another --- src/ui/App.tsx | 3 ++- src/ui/usePanes.ts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/App.tsx b/src/ui/App.tsx index a8e695a..0e81391 100644 --- a/src/ui/App.tsx +++ b/src/ui/App.tsx @@ -160,7 +160,7 @@ export function App(props: { readonly session: T3Session; readonly config: T3tui /** Where a drag of the drawer's edge started, and the drawer's height then. */ const drawerDrag = useRef({ y: 0, height: 0 }); const [diff, setDiff] = useState(null); - /** The conversation's height, for the column when it takes that place; and with the drawer under it, for the drawer. */ + /** The conversation's height, for the column when it takes that place; and the conversation's and drawer's together. */ const [contentHeight, setContentHeight] = useState(0); const [areaHeight, setAreaHeight] = useState(0); const [config, setConfig] = useState(props.config); @@ -583,6 +583,7 @@ export function App(props: { readonly session: T3Session; readonly config: T3tui const openEditor = () => { const composer = composerRef.current; if (!composer) return; + if (panes.message) return panes.enter("message"); const key = composerKey; const file = scratchFile(composerText(composer)); panes.openMessage({ diff --git a/src/ui/usePanes.ts b/src/ui/usePanes.ts index f18cd5d..267e8ee 100644 --- a/src/ui/usePanes.ts +++ b/src/ui/usePanes.ts @@ -139,7 +139,6 @@ export function usePanes(deps: { }; /** The message in $EDITOR, in the composer's place. */ const openMessage = (program: LocalProgram) => { - if (message) return enter("message"); setMessage(program); enter("message"); };