summaryrefslogtreecommitdiff
path: root/src/gui/gui.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 00:13:11 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit42748f92b77367db415c8b4d0f2e537a9e1ddde7 (patch)
tree3ff6606d33149581d5954dcc900eb6ab3e4f0f17 /src/gui/gui.zig
parent23f430573efe4f6ef55b0180aa0d742ff4eca1d9 (diff)
downloadpardes-42748f92b77367db415c8b4d0f2e537a9e1ddde7.tar.gz
pardes-42748f92b77367db415c8b4d0f2e537a9e1ddde7.zip
Make the column and workspace tags Texts with the pane tag's keys
The headers had their own one-line editor with its own keys: Enter always executed, h/l and J/K moved between headers and panes, Ctrl-c/x/v cut and pasted, and TagLine refused a newline that 9P accepted. They are now Texts like a pane's tag, with no prefix and a default until edited, so normal and insert mode, undo and the look and execute keys are the body's. Moving between them is the window keys' job: Up from a pane with nothing above it reaches its column's tag and then the workspace's, Down comes back, and Left and Right walk the column tags. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/gui/gui.zig')
-rw-r--r--src/gui/gui.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig
index 97bbc816..dfd528a3 100644
--- a/src/gui/gui.zig
+++ b/src/gui/gui.zig
@@ -7360,7 +7360,7 @@ fn appendWorkspacePet(g: *Gui, core: ?*const pardes.Pardes, surface: *const pard
for (surface.cells[0..surface.cols], 0..) |*cell, i| {
if (cellCodepoint(cell) != ' ') occupied = i + 1;
}
- const editing = p.topbar_col != null and p.header_column == null;
+ const editing = p.header_focus and p.header_column == null;
const band_top: f32 = @floatFromInt(taglineBandOffset(0, builder.win_h, g.cell_h, g.tagline_height));
const region = if (occupied >= surface.cols) null else pet.lane(
occupied,
@@ -7412,8 +7412,7 @@ test "pet overlay stays beyond workspace text and vanishes while its tag is edit
try std.testing.expect(x >= 20 * 8 - 0.01);
try std.testing.expect(y >= 0 and y < 20);
}
- core.topbar_col = 0;
- core.header_column = null;
+ core.enterHeader(null);
builder.len = 0;
appendWorkspacePet(&g, core, &surface, &builder);
try std.testing.expectEqual(@as(usize, 0), builder.len);