summaryrefslogtreecommitdiff
path: root/src/builtins.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-27 12:21:41 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit281b1eb2d5249caece4ac69a7d975cb01d2e7a89 (patch)
tree688c6e72a82f3b574b18657f98e4250886d98b83 /src/builtins.zig
parent9b8146a7df6270613ab48ba3df53e97a558d1ba4 (diff)
downloadpardes-281b1eb2d5249caece4ac69a7d975cb01d2e7a89.tar.gz
pardes-281b1eb2d5249caece4ac69a7d975cb01d2e7a89.zip
Replace a stillborn placeholder pane when a pane joins its column, and focus the pane a directional Del grows
A pane that joins a column whose only other pane is an untouched empty scratch (Newcol's, or the stand-in a closed column leaves) takes the column whole. Checked at the end of the step, since the pane that asked for the joiner is often the placeholder itself. Del k|j focuses the pane that took the rows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/builtins.zig')
-rw-r--r--src/builtins.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/builtins.zig b/src/builtins.zig
index a5dbf6cd..ac336ce0 100644
--- a/src/builtins.zig
+++ b/src/builtins.zig
@@ -517,7 +517,9 @@ pub const Del = struct {
if (c.pane.msg_announcement) c.pane.msg_len = 0;
return;
}
- c.p.removePane(c.id, to) catch |err| c.p.reportError(c.id, "close", err);
+ c.p.removePane(c.id, to) catch |err| return c.p.reportError(c.id, "close", err);
+ // Del k|j is a direction: focus lands where the rows went.
+ if (to) |gainer| c.p.active = gainer;
}
};