summaryrefslogtreecommitdiff
path: root/core/bindings.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/bindings.zig')
-rw-r--r--core/bindings.zig10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/bindings.zig b/core/bindings.zig
index da8ed4dc..6128e311 100644
--- a/core/bindings.zig
+++ b/core/bindings.zig
@@ -596,7 +596,9 @@ test "\" shows the registers rolled, the ones holding something, each its value
p.advance(p.clock.now_ns);
try std.testing.expectEqual(p.clock.now_ns + 300 * std.time.ns_per_ms, p.view().tag_state.due_ns);
p.clock.now_ns = p.view().tag_state.due_ns;
- const rolled = try tagline.tagText(p, a, pane);
+ // Rolled under the tag, which is as it was (UX DESIGN M1).
+ try std.testing.expectEqualStrings(rest, try tagline.tagText(p, a, pane));
+ const rolled = (try @import("TagState.zig").head(p, a, pane)).?.text;
try std.testing.expect(std.mem.indexOf(u8, rolled, "\" ▸ \" self.dirty = true; a const best = rank(q… n ab⏎ p …proj/core/Query.zig % /test.txt . o # 1 ") != null);
// Its ⏎ in the dim ink.
const h = (try @import("TagState.zig").head(p, a, pane)).?;
@@ -653,13 +655,13 @@ test "\" shows the registers rolled, the ones holding something, each its value
try std.testing.expect(std.mem.indexOf(u8, band.items, "return best;") != null);
// Enter chooses it: its verbs, rolled.
p.update(.{ .key = .{ .cp = Key.enter } });
- try std.testing.expect(std.mem.indexOf(u8, try tagline.tagText(p, a, pane), "\" a ▸ p after P before R replace y into") != null);
+ try std.testing.expect(std.mem.indexOf(u8, (try @import("TagState.zig").head(p, a, pane)).?.text, "\" a ▸ p after P before R replace y into") != null);
try std.testing.expect(!p.view().tag_state.unrolled);
// Backspace: the registers again; a register's own key goes down too.
p.update(.{ .key = .{ .cp = Key.backspace } });
- try std.testing.expect(std.mem.indexOf(u8, try tagline.tagText(p, a, pane), "\" ▸ \" self.dirty") != null);
+ try std.testing.expect(std.mem.indexOf(u8, (try @import("TagState.zig").head(p, a, pane)).?.text, "\" ▸ \" self.dirty") != null);
p.update(.{ .key = .{ .cp = 'a' } });
- try std.testing.expect(std.mem.indexOf(u8, try tagline.tagText(p, a, pane), "\" a ▸ p after") != null);
+ try std.testing.expect(std.mem.indexOf(u8, (try @import("TagState.zig").head(p, a, pane)).?.text, "\" a ▸ p after") != null);
// p pastes it after the selection, and the tag is at rest.
p.update(.{ .key = .{ .cp = 'p' } });
try std.testing.expect(std.mem.indexOf(u8, pane.file.?.content, "const best = rank(q, name) orelse continue;") != null);