Skip to content
Merged
Changes from 1 commit
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: 5 additions & 1 deletion packages/opencode/src/cli/cmd/tui/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {

useKeyboard((evt) => {
if (!Flag.OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT) return
if (!renderer.getSelection()) return
const sel = renderer.getSelection()
if (!sel) return

// Windows Terminal-like behavior:
// - Ctrl+C copies and dismisses selection
Expand All @@ -323,6 +324,9 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
return
}

const focus = renderer.currentFocusedRenderable
if (focus?.hasSelection() && sel.selectedRenderables.includes(focus)) return
Comment thread
Hona marked this conversation as resolved.
Outdated

renderer.clearSelection()
})

Expand Down
Loading