We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc30bfc commit fa96cb9Copy full SHA for fa96cb9
1 file changed
packages/opencode/src/cli/cmd/tui/app.tsx
@@ -299,7 +299,8 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
299
300
useKeyboard((evt) => {
301
if (!Flag.OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT) return
302
- if (!renderer.getSelection()) return
+ const sel = renderer.getSelection()
303
+ if (!sel) return
304
305
// Windows Terminal-like behavior:
306
// - Ctrl+C copies and dismisses selection
@@ -323,6 +324,11 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
323
324
return
325
}
326
327
+ const focus = renderer.currentFocusedRenderable
328
+ if (focus?.hasSelection() && sel.selectedRenderables.includes(focus)) {
329
+ return
330
+ }
331
+
332
renderer.clearSelection()
333
})
334
0 commit comments