diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-30 14:12:51 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | b546b578baadbd8fdd15b42988ad4d66c9c8ff21 (patch) | |
| tree | bbbcaa94d63b0b695f09f2d389ca287377880d9a /src/terminal.zig | |
| parent | 3f6733c805d873a7af6a6064ace0cf5916f481da (diff) | |
| download | pardes-b546b578baadbd8fdd15b42988ad4d66c9c8ff21.tar.gz pardes-b546b578baadbd8fdd15b42988ad4d66c9c8ff21.zip | |
A program that tracks the mouse gets its clicks, drags and moves over its grid, in the format it chose; Shift keeps pardes's select, execute and look, and chrome is never the program's
Presses and releases under 1000, drags with a button down under 1002,
every move once per cell under 1003, X10 presses under 9, in raw terminal
input only. A press the program took keeps its drag and release, reported
clamped to the grid's edge wherever the pointer goes. The press also makes
the pane the active one. docs/tags.md says so.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/terminal.zig')
| -rw-r--r-- | src/terminal.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/terminal.zig b/src/terminal.zig index 4d16bef2..63c5479f 100644 --- a/src/terminal.zig +++ b/src/terminal.zig @@ -380,6 +380,13 @@ pub fn reportsMouse(pane: *const Pane) bool { return state.vt.flags.mouse_event != .none; } +/// ...every move of it, a button down or not (1003). +pub fn tracksAllMotion(pane: *const Pane) bool { + if (comptime !enabled) return false; + const state = pane.terminal orelse return false; + return state.vt.flags.mouse_event == .any; +} + /// ...and wants them in SGR (1006) rather than the legacy X10 bytes. pub fn mouseFormatSgr(pane: *const Pane) bool { if (comptime !enabled) return false; |
