summaryrefslogtreecommitdiff
path: root/src/mouse.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/mouse.zig')
-rw-r--r--src/mouse.zig9
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;