diff options
Diffstat (limited to 'core/edit_cmd.zig')
| -rw-r--r-- | core/edit_cmd.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/edit_cmd.zig b/core/edit_cmd.zig index aec97c63..8fbde726 100644 --- a/core/edit_cmd.zig +++ b/core/edit_cmd.zig @@ -300,7 +300,7 @@ fn answerHold(p: *Pardes, at: usize, failed: bool) void { if (!failed) return; const words = if (p.fs.said_at == p.fs.failures and p.fs.said_len > 0) p.fs.said[0..p.fs.said_len] - else if (p.panes[at]) |pane| pane.msg[0..pane.msg_len] else "Edit: failed"; + else if (p.panes[at]) |pane| p.messages.saidBy(pane) else "Edit: failed"; const kept = @import("Messages.zig").clip(words, h.said.len); @memcpy(h.said[0..kept.len], kept); h.said_len = @intCast(kept.len); @@ -625,6 +625,8 @@ test "X over open files, w, e, r, f, B and D on panes and the disk" { const dir = dir_buf[0..try tmp.dir.realPath(testing.io, &dir_buf)]; const p = try th.withFile(gpa, "scratch\n"); defer p.deinit(); + // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6). + p.settings.jumps = .@"new-pane"; var path: [4200]u8 = undefined; look.lookAt(p, 0, try std.fmt.bufPrint(&path, "{s}/a.c", .{dir})); const a = p.view().active; @@ -697,6 +699,8 @@ test "an Edit's w to a file changed on disk is refused once, as Save is, and the const dir = dir_buf[0..try tmp.dir.realPath(testing.io, &dir_buf)]; const p = try th.withFile(testing.allocator, "scratch\n"); defer p.deinit(); + // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6). + p.settings.jumps = .@"new-pane"; var path: [4200]u8 = undefined; look.lookAt(p, 0, try std.fmt.bufPrint(&path, "{s}/a.txt", .{dir})); const a = p.view().active; @@ -731,6 +735,8 @@ test "an Edit with no command runs beside one whose commands run, unless it touc const dir = dir_buf[0..try tmp.dir.realPath(testing.io, &dir_buf)]; const p = try th.withFile(testing.allocator, "b\na\n"); defer p.deinit(); + // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6). + p.settings.jumps = .@"new-pane"; var path: [4200]u8 = undefined; look.lookAt(p, 0, try std.fmt.bufPrint(&path, "{s}/other.txt", .{dir})); const other = p.view().active; |
