diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/look.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/look.zig b/src/look.zig index 17746cd1..542b1b63 100644 --- a/src/look.zig +++ b/src/look.zig @@ -748,6 +748,12 @@ fn lookEdge(delta: i32) LookFrom { fn lookStand(pane: *Pane) LookFrom { if (pane.look_at) |s| if (s.row == pane.body.cur_row and s.col0 == pane.body.cur_col) return .{ .row = s.row, .col = s.col0, .strict = true }; + // A selection on one row (a Restore brings the dot back as one, with no + // walk remembered) is where the walk stands: from its start, past it + // either way, as from a spot the walk landed on. + const v = pane.body.vsel; + if (v.active and v.explicit and v.row == pane.body.cur_row and v.col != pane.body.cur_col) + return .{ .row = v.row, .col = @min(v.col, pane.body.cur_col), .strict = true }; return .{ .row = pane.body.cur_row, .col = pane.body.cur_col }; } |
