Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/tui/src/routes/session/question.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ export function QuestionPrompt(props: { request: QuestionRequest; directory?: st
function selectTab(index: number) {
setStore("tab", index)
setStore("selected", 0)
// Mouse handlers switch tabs while the custom-answer editor is open; stale editing
// state would keep Return bound to the editor on the new tab.
setStore("editing", false)
}

function selectOption() {
Expand All @@ -118,6 +121,9 @@ export function QuestionPrompt(props: { request: QuestionRequest; directory?: st
}
const opt = options()[store.selected]
if (!opt) return
// Mouse handlers reach this while the custom-answer editor is open; leaving it enabled
// keeps Return bound to the editor instead of submit/confirm.
setStore("editing", false)
if (multi()) {
toggle(opt.label)
return
Expand Down
Loading