diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-20 00:03:29 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-20 00:03:29 -0300 |
| commit | 3a3601f984d25f1e03cee3ac47da7eeb2548e511 (patch) | |
| tree | 445331cb8ad346989c4e4f6a3ceff54411064e4a /core/mouse.zig | |
| parent | 8a1f65a2d374796b9b5559c4aab87c8d1e8f6e68 (diff) | |
| parent | 528530ed065b2059d16b08efd92103d1dbbccc31 (diff) | |
| download | pardes-3a3601f984d25f1e03cee3ac47da7eeb2548e511.tar.gz pardes-3a3601f984d25f1e03cee3ac47da7eeb2548e511.zip | |
integration: a far client's seven small faults on the renamed tree: pardes-far-faults (a refocus that no longer asks the session's host about a newer build; a drag in a kind's pane grown too short; a draw's token that no rollback takes back; a text's declarations dumped so a joined client's query reads what the session's does; a search that goes on at once on a far client; two tests of what cannot happen) and pardes-merge24, merged without a textual conflict; the coordinator's gate in the ledger (reorg/merge25)
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/mouse.zig')
| -rw-r--r-- | core/mouse.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/mouse.zig b/core/mouse.zig index cefc0335..cdf4892e 100644 --- a/core/mouse.zig +++ b/core/mouse.zig @@ -247,8 +247,11 @@ fn kindMouse(p: *Pardes, m: Mouse) bool { if (m.kind == .press) v.active = id; if (m.kind == .press and m.button != .wheel_up and m.button != .wheel_down and m.button != .wheel_left and m.button != .wheel_right) v.kind_grab = @intCast(id); if (m.kind == .release) v.kind_grab = null; - const col = std.math.clamp(m.col, x0, r.x + r.w -| 1) - x0; - const row = std.math.clamp(m.row, top, r.y + r.h -| 1) - top; + // Grabbed, it may be anywhere, and the pane since made too narrow + // or short for a cell of body (a resize, a pane added above): its + // body's last cell, the first of none. + const col = @min(m.col -| x0, (r.x + r.w) -| x0 -| 1); + const row = @min(m.row -| top, (r.y + r.h) -| top -| 1); return pardes.Kind.mouse(p, id, m, col, row); } kindLeave(p); |
