Skip to content

Commit 0630c60

Browse files
author
Yogthos
committed
fix: remove EnableMouseCapture to allow native terminal text selection
Root cause: EnableMouseCapture sent ?1000h/?1002h/?1006h/?1015h to the terminal, redirecting ALL mouse events (including drag) to the app. This blocked the terminal's native text selection. Changes: - terminal.rs: remove EnableMouseCapture, update shutdown comment. DECRST sequences are idempotent defensive cleanup so left in place. - event.rs: remove ScrollUp, ScrollDown, MouseDown, MouseDrag, MouseUp variants from UserEvent enum. - ui/mod.rs: remove background mouse event reader thread, all mouse/scroll event handlers in main loop and permission alert loop, selection-copy handler (y key), selection-clear handler (Esc key), and Esc double-tap guard that checked selection_active. - slash.rs: update help text — 'drag + Cmd/Ctrl+C' replaces mouse selection and mouse scroll entries. Users now use native terminal text selection (drag to select, Cmd+C/Ctrl+Shift+C to copy, PgUp/PgDn to scroll).
1 parent 5b8a152 commit 0630c60

4 files changed

Lines changed: 10 additions & 469 deletions

File tree

src/event.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -157,20 +157,6 @@ pub enum AgentEvent {
157157
#[derive(Debug, Clone)]
158158
pub enum UserEvent {
159159
Key(crossterm::event::KeyEvent),
160-
ScrollUp,
161-
ScrollDown,
162-
MouseDown {
163-
row: u16,
164-
col: u16,
165-
},
166-
MouseDrag {
167-
row: u16,
168-
col: u16,
169-
},
170-
MouseUp {
171-
row: u16,
172-
col: u16,
173-
},
174160
Paste(String),
175161
/// Terminal was resized. Carries no payload — the renderer queries
176162
/// `crossterm::terminal::size()` directly; the variant is just a kick

0 commit comments

Comments
 (0)