summaryrefslogtreecommitdiff
path: root/src/builtins.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/builtins.zig')
-rw-r--r--src/builtins.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/builtins.zig b/src/builtins.zig
index aa2b2d6d..30a5a50f 100644
--- a/src/builtins.zig
+++ b/src/builtins.zig
@@ -701,6 +701,9 @@ pub const Last = struct {
// Restore the cursor without recentering the pane's retained view.
if (j.pane != c.id) return c.p.focusPaneLine(j.pane, .{ .line = j.line, .col = j.col }, .keep);
}
+ // Nothing on the jumplist to go back to, which is the ordinary case
+ // for a pane that opened beside this one and was never focused.
+ if (c.p.neighbourPane(c.id)) |next| c.p.focusPaneLine(next, .{ .line = 0, .col = 0 }, .keep);
}
};