diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-24 10:29:10 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-24 10:29:10 -0300 |
| commit | 18d89dcedaed1f8437799621675e88ca47d7cdc1 (patch) | |
| tree | 2cf2e2ae46de1308e5b90aca33413282cdd73e8b /src/mouse.zig | |
| parent | 873f81ccb1449119846de8d4e6e0e8899236100a (diff) | |
| download | pardes-18d89dcedaed1f8437799621675e88ca47d7cdc1.tar.gz pardes-18d89dcedaed1f8437799621675e88ca47d7cdc1.zip | |
Search converge 2/6: a pane's places, every match or listed place tinted and ticked on the rail, n/N stepping them silently, shifted by an edit rather than searched again
Diffstat (limited to 'src/mouse.zig')
| -rw-r--r-- | src/mouse.zig | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mouse.zig b/src/mouse.zig index eeb987b2..ec5560d0 100644 --- a/src/mouse.zig +++ b/src/mouse.zig @@ -751,8 +751,15 @@ pub fn handleMouse(p: *Pardes, event: Mouse) void { const tag_y = p.tagTop(pane, r); const body_y = p.bodyTop(pane, r); if (mcol < r.x + config.GUTTER) { - // gutter scrollbar: a left click scrolls UP to that row p.active = id; + // A tick of the pane's places: that place, selected and in view. + // The rail is chrome, and only the tick's cell does this. + const rail_h = r.h -| pane.tag_rows; + if (mrow >= body_y and mrow < body_y + rail_h) if (pane.places.tickHit(p, pane, mrow - body_y, rail_h)) |i| { + pane.focus = .body; + return pane.places.goTo(pane, i, false); + }; + // gutter scrollbar: a left click scrolls UP to that row pane.scrollBy(-(@as(i32, mrow) - @as(i32, body_y))); } else { const on_tag = mrow >= tag_y and mrow < tag_y + pane.tag_rows; |
