From b70ef491f1553929920b9b653ad3240466478e3e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 2 Oct 2026 00:46:14 -0300 Subject: 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 --- src/esp32p4.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/esp32p4.zig') 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; -- cgit v1.3