Click and scroll in a session with send --mouse #145
No reviewers
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis!145
Loading…
Reference in a new issue
No description provided.
Delete branch "cli/send-mouse"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #131.
Commits
0pixel axis (a sender with no pointer) gets the middle of the pixels a program maps back to its cell, at the PTY winsize's full ratio (Grid::winsize_pixels, from #143). Theencode_mouseprotocol filter is factored out asfelis_grid::mouse_event_reported.send --mouse.send --mouse [MODS+]ACTION[-BUTTON]:COL,ROW(repeatable), 0-based cells matchingsearch --source visible'scol_spans.--keyand--mousego out after TEXT in command-line order (a hand-written clapArgsreads both back by argv index). Before writing anything the CLI checks every event against the burst'sModeFlags.mouse_protocoland the grid dims, and refuses the whole command (invalid_request, exit 1) when the program would drop one or a cell is off the grid.No wire change, no minor gate:
Input::Mousefrom a non-window attachment andModeFlags.mouse_protocolboth exist since minor 0; only the doc comment onpx/pygains the0meaning.Decisions settled here
invalid_request, no new kind; no caller branches on it yet and kinds are append-only.--key; reworded to: an input kind that stands alone joins the first constraint, anything that reads only in combination with another flag is a new verb.Verification
cargo nextest run --workspace: 4068 passed; workspace clippy (--all-targets --all-features) clean;just prose-check0 hits;just schemano drift; each commit builds.send --mouse click:8,4/click:8,1; an off-grid cell and a plain shell were refused with exit 1 and nothing sent.send --mouseReal-TUI run
Debug build of this branch, isolated daemon, headless sessions (no window, so the nominal cell). Targets found with
search --source visibleand clicked with thecol_spansnumbers as given.?1003+?1016(SGR-pixels)clickon two buttonsmouse=a)?1002+ SGRclick,wheel-down×2,press/drag/release,ctrl+click-right12,13,7,1); scrolled 6 lines; 3-line visual selection;ctrl+rightran tag pop (E73)mouse=a)click,press/drag/release7,10), drag end at4,7clickonPIDandMEM%headers (after a multi-byte△),wheel-down,clickonF10Quitclickon the Commits panel, then oncommit 1clickonOptions; doubleclickon/.git.git?1000click,wheel-down;dragdragrefused with exit 1 (?1000 without ?1002), nothing sentclickontree,clickonmenuRefusals seen: an off-grid cell (exit 1,
outside the 80x24 grid) and a plain shell (exit 1,no mouse reporting on).One quirk, not felis: ranger ignores the very first click after start-up. A hand-encoded
--rawSGR click is ignored the same way, and every later click lands.Correction to the table above: the "Mouse mode" column was partly inferred, not observed. Observed: ranger runs
?1000alone (the CLI refused itsdrag); nvim, vim and mc accept drags, so they run?1002or?1003. Textual turning on SGR-pixels is from its source (#131), not read off the session. The encodings for htop, lazygit and btop were not checked; the results column is unaffected.