diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 16:38:06 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | bdbab17204efdb785b6ab3cc2022484485c0ded2 (patch) | |
| tree | 34aa73b7bfbccd46b008e06cd116f35130a117b3 /src/normal.zig | |
| parent | e87e16547a17864b2a0cd574c1aa42d44125bc6c (diff) | |
| download | pardes-bdbab17204efdb785b6ab3cc2022484485c0ded2.tar.gz pardes-bdbab17204efdb785b6ab3cc2022484485c0ded2.zip | |
g. goes to where the last edit ended
helix goto_last_modification: every range moves to the end of the last
change (the start of a deletion, the end of an insertion), extending in
select mode. The position is kept on the Text in surface rows, set where
setEditText hands a body its new text, so a terminal's typed text has one
too and moves with its scrollback.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/normal.zig')
| -rw-r--r-- | src/normal.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/normal.zig b/src/normal.zig index bc450581..228c9c39 100644 --- a/src/normal.zig +++ b/src/normal.zig @@ -460,6 +460,10 @@ fn executeNormalAction(p: *Pardes, t: *Text, semantic: modal.Normal.Action) void .view_top => return t.gotoWindow(text, range, .top, go.count), .view_center => return t.gotoWindow(text, range, .center, go.count), .view_bottom => return t.gotoWindow(text, range, .bottom, go.count), + .last_modification => { + const at = t.last_edit orelse return; + return t.pointMove(text, range, modal.offsetAt(text, .{ .row = @intCast(@max(0, at.row)), .col = @intCast(@max(0, at.col)) })); + }, }, .view => |view| if (t.what == .body) switch (view) { .top => { |
