diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-02 00:46:14 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-02 00:46:14 -0300 |
| commit | b70ef491f1553929920b9b653ad3240466478e3e (patch) | |
| tree | 42614eb233197f5f04086835251948491cbff341 /src/esp32p4.zig | |
| parent | 3569756377d191621a0a0b2860e47a84860b45ce (diff) | |
| download | pardes-b70ef491f1553929920b9b653ad3240466478e3e.tar.gz pardes-b70ef491f1553929920b9b653ad3240466478e3e.zip | |
A mouse report before the first row or column (SGR's 0, a drag past the window's top or left, in cells or 1016's pixels) is the window's edge in the terminal and the ESP32 shells, never a panic that lost unsaved text; the GUI already clamped
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/esp32p4.zig')
| -rw-r--r-- | src/esp32p4.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/esp32p4.zig b/src/esp32p4.zig index 4e1fe036..6772e75d 100644 --- a/src/esp32p4.zig +++ b/src/esp32p4.zig @@ -455,8 +455,9 @@ fn apply(c: *pardes.Pardes, ev: vaxis.Event) void { .motion => .motion, .drag => .drag, }, - .col = @intCast(m.col), - .row = @intCast(m.row), + // Before the first cell (a drag past the edge): the edge. + .col = @intCast(@max(0, m.col)), + .row = @intCast(@max(0, m.row)), .ctrl = m.mods.ctrl, } }); dirty = true; |
