summaryrefslogtreecommitdiff
path: root/core/jj.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/jj.zig')
-rw-r--r--core/jj.zig14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/jj.zig b/core/jj.zig
index b278f4ba..05daeef6 100644
--- a/core/jj.zig
+++ b/core/jj.zig
@@ -2543,6 +2543,8 @@ test "At shows a file at a revision beside it, read-only, coloured as its file;
defer repo.deinit(gpa);
const p = try Pardes.init(gpa, .{ .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";
var line: [4200]u8 = undefined;
p.update(.{ .command = try std.fmt.bufPrint(&line, "Look {s}", .{repo.file}) });
const file = p.view().active;
@@ -2964,6 +2966,8 @@ test "Changes draws what the text has not where it stood, as ghost rows: a line
for ([_]bool{ false, true }) |windowed| {
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 60, .rows = 24, .windowed = windowed });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var line: [4200]u8 = undefined;
p.update(.{ .command = try std.fmt.bufPrint(&line, "Look {s}", .{repo.file}) });
const id = p.view().active;
@@ -3250,6 +3254,8 @@ test "a description is whole, its title and its author never cut: in a pane narr
for ([_]bool{ false, true }) |windowed| {
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 50, .rows = 20, .windowed = windowed });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var line: [4200]u8 = undefined;
p.update(.{ .command = try std.fmt.bufPrint(&line, "Look {s}", .{repo.file}) });
const id = p.view().active;
@@ -3487,6 +3493,8 @@ test "at one place a change's ghost rows come before its description: a line it
defer repo.deinit(gpa);
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 60, .rows = 24, .windowed = false });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var line: [4200]u8 = undefined;
p.update(.{ .command = try std.fmt.bufPrint(&line, "Look {s}", .{repo.file}) });
const pane = p.panes[p.view().active].?;
@@ -3513,6 +3521,8 @@ test "a change the revset does not pin, between two it does, moves the older one
defer repo.deinit(gpa);
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 60, .rows = 24, .windowed = false });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var line: [4200]u8 = undefined;
p.update(.{ .command = try std.fmt.bufPrint(&line, "Look {s}", .{repo.file}) });
const pane = p.panes[p.view().active].?;
@@ -3605,6 +3615,8 @@ test "the layer's lines are the pane's text, read-only: j and k go onto them, a
// query however long the test's directory makes the tags.
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 60, .rows = 44, .windowed = windowed });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var arena: std.heap.ArenaAllocator = .init(gpa);
defer arena.deinit();
const pane = try Lines.open(p, repo.file);
@@ -4404,6 +4416,8 @@ test "Compare pins the whole difference between each two points as one change: t
for ([_]bool{ false, true }) |windowed| {
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 70, .rows = 24, .windowed = windowed });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var line: [4200]u8 = undefined;
p.update(.{ .command = try std.fmt.bufPrint(&line, "Look {s}", .{repo.file}) });
const id = p.view().active;