summaryrefslogtreecommitdiff
path: root/core/Query.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Query.zig')
-rw-r--r--core/Query.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/Query.zig b/core/Query.zig
index a090929a..e64f5b89 100644
--- a/core/Query.zig
+++ b/core/Query.zig
@@ -2179,6 +2179,8 @@ test "parse: line 1's first word names the source" {
test "a / query: keystroke by keystroke, the owner shows the set, rows from its own rows alone, zero hits a state, Esc puts all back" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const pane = try p.setTestFile("alpha one\nbeta\nalphabet\ngamma alpha\nalpha two\ndelta\n");
p.newScratchBelow(0);
const below = p.view().cols[0].panes[1];
@@ -2244,6 +2246,8 @@ test "a / query: keystroke by keystroke, the owner shows the set, rows from its
test "a dump holding a query pane, live or frozen, restores it as it was" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
_ = try p.setTestFile("alpha one\nbeta\nalphabet\n");
slash(p, "/alpha");
for (0..2) |_| {
@@ -2263,6 +2267,8 @@ test "a dump holding a query pane, live or frozen, restores it as it was" {
test "a / query: Enter lands and freezes, the register filled, n and N step silently, a later / reuses the pane and Esc brings the frozen rows back" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const pane = try p.setTestFile("alpha one\nbeta\nalphabet\ngamma alpha\nalpha two\ndelta\n");
slash(p, "/alpha");
const qid = queryPane(p).?;
@@ -2536,6 +2542,8 @@ test "a language server's list: one answer lands with no pane, several open the
test "B1 on a query pane's rows places the caret and selects, nothing else, the current row's mark kept; j, k and n make a row current, Enter lands the current" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const pane = try p.setTestFile("alpha one\nbeta\nalphabet\ngamma alpha\nalpha two\ndelta\n");
slash(p, "/alpha");
const qid = queryPane(p).?;