summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index f78c2c0d..6c5a01af 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -2966,11 +2966,15 @@ test "editable workspace and column tags are typed into and persist" {
p.update(.{ .mouse = .{ .button = .left, .kind = .drag, .col = TAG_TEXT_INSET + 6, .row = 0 } });
p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = TAG_TEXT_INSET + 6, .row = 0 } });
try std.testing.expect(p.global_tag.vsel.active and p.global_tag.vsel.col == 0 and p.global_tag.cur_col == 6);
- p.update(.{ .key = .{ .cp = 'H', .text = " Help" } });
+ // A clicked header is in normal mode: `a` types after the sweep's
+ // last character, the blank it ended on.
+ p.update(.{ .key = .{ .cp = 'a', .text = "a" } });
+ p.update(.{ .key = .{ .cp = 'H', .text = "Help " } });
try std.testing.expect(std.mem.startsWith(u8, p.global_tag.own.?, "Newcol Help Joincol"));
p.update(.{ .key = .{ .cp = Key.escape } });
p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = TAG_TEXT_INSET, .row = TOPBAR_H } });
p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = TAG_TEXT_INSET, .row = TOPBAR_H } });
+ p.update(.{ .key = .{ .cp = 'i', .text = "i" } });
p.update(.{ .key = .{ .cp = 'é', .text = "é" } });
try std.testing.expect(std.mem.startsWith(u8, tagline.columnTag(p, 0), "éNew"));
p.update(.{ .key = .{ .cp = Key.backspace } });