You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JDonaghy/quadraui#269 — tui runtime: line-wise mouse text selection + OSC52
copy via shared drag-origin dispatch. Don't start until that lands and the new
quadraui version is pinned here.
Why
quadraui #269 adds two things to the TUI runtime that let vimcode delete a stack
of bespoke, environment-fragile code:
OSC52 clipboard write in services().clipboard() — works over SSH/tmux,
no external binary.
Cross-backend selectable text regions + DragTarget::TextSelection
drag-origin dispatch, with line-wise selection and Ctrl-C copy.
Work
1. Delete the TUI clipboard plumbing (high confidence)
Remove find_clipboard_write_cmd, find_clipboard_read_cmd, setup_tui_clipboard, tui_copy_to_clipboard (src/tui_main/mod.rs:644–771),
plus the DISPLAY=:0 hack and the copypasta_ext-bug workaround.
Route writes through services().clipboard().write_text() (OSC52 + arboard).
Reads stay native/arboard — OSC52 read is disabled in most terminals.
Reassess the engine.clipboard_read / engine.clipboard_write callback
indirection — likely collapses into the quadraui service.
sync_tui_clipboard (yank register → system clipboard) keeps its trigger but
writes via the service.
The terminal panel's screen-cell selection + manual auto-copy-on-release
(src/tui_main/mouse.rs:1145) maps onto quadraui's selectable-region +
Ctrl-C/auto-copy. Register the terminal content rect as a TextRegion; drop the
bespoke drag + auto-copy bookkeeping.
The editor's visual selection is document-model: window_zone_hit_test → WindowZone::TextArea { buf_line, col } → engine.mouse_drag(window, line, col) (src/tui_main/mouse.rs:1004). Keep the
document mapping in the engine.
Move the drag-origin arbitration + gesture lifecycle onto a quadraui DragTarget, mirroring how scrollbar drag already feeds through quadraui::dispatch_mouse_drag (src/tui_main/mouse.rs:51). Net: more bespoke mouse_text_drag bookkeeping in mouse.rs collapses.
Blocked on
JDonaghy/quadraui#269— tui runtime: line-wise mouse text selection + OSC52copy via shared drag-origin dispatch. Don't start until that lands and the new
quadraui version is pinned here.
Why
quadraui #269 adds two things to the TUI runtime that let vimcode delete a stack
of bespoke, environment-fragile code:
services().clipboard()— works over SSH/tmux,no external binary.
DragTarget::TextSelectiondrag-origin dispatch, with line-wise selection and Ctrl-C copy.
Work
1. Delete the TUI clipboard plumbing (high confidence)
find_clipboard_write_cmd,find_clipboard_read_cmd,setup_tui_clipboard,tui_copy_to_clipboard(src/tui_main/mod.rs:644–771),plus the
DISPLAY=:0hack and the copypasta_ext-bug workaround.services().clipboard().write_text()(OSC52 + arboard).Reads stay native/arboard — OSC52 read is disabled in most terminals.
engine.clipboard_read/engine.clipboard_writecallbackindirection — likely collapses into the quadraui service.
sync_tui_clipboard(yank register → system clipboard) keeps its trigger butwrites via the service.
2. Replace integrated-terminal screen selection (medium)
(
src/tui_main/mouse.rs:1145) maps onto quadraui's selectable-region +Ctrl-C/auto-copy. Register the terminal content rect as a
TextRegion; drop thebespoke drag + auto-copy bookkeeping.
3. Route editor visual-selection drag arbitration (design needed)
window_zone_hit_test → WindowZone::TextArea { buf_line, col } → engine.mouse_drag(window, line, col)(src/tui_main/mouse.rs:1004). Keep thedocument mapping in the engine.
DragTarget, mirroring how scrollbar drag already feeds throughquadraui::dispatch_mouse_drag(src/tui_main/mouse.rs:51). Net: more bespokemouse_text_dragbookkeeping inmouse.rscollapses.DragTarget::TextSelectioncancarry a consumer payload (window/line/col) or vimcode needs a thin consumer-side
variant.
Acceptance
over SSH/tmux via OSC52.
src/tui_main/mouse.rsandsrc/tui_main/mod.rsshrink.Prereq:
JDonaghy/quadraui#269