summaryrefslogtreecommitdiff
path: root/src/ninep/ctl.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep/ctl.zig')
-rw-r--r--src/ninep/ctl.zig18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig
index 645b1c33..484b08c9 100644
--- a/src/ninep/ctl.zig
+++ b/src/ninep/ctl.zig
@@ -297,9 +297,9 @@ test "the pane ctl takes get, lock and unlock, and nothing that a file of its ow
defer p.deinit();
const ctl_node = Node.of(serialOf(p), .ctl);
for ([_][]const u8{
- "menu", "nomenu", "dump echo hi", "font Go Mono", "lock x", "bogus", "DEL",
- "name x.txt", "put", "del", "delete", "Look x", "Exec Save", "clean",
- "dirty", "cleartag", "dot=addr", "addr=dot", "show", "mark", "nomark",
+ "menu", "nomenu", "dump echo hi", "font Go Mono", "lock x", "bogus", "DEL",
+ "name x.txt", "put", "del", "delete", "Look x", "Exec Save", "clean",
+ "dirty", "cleartag", "dot=addr", "addr=dot", "show", "mark", "nomark",
"scroll", "limit=addr", "get x", "look /tmp", "exec Del",
}) |bad| try testing.expectEqual(E.INVAL, wr(p, ctl_node, bad).errno());
try testing.expect(p.paneBySerial(serialOf(p)) != null);
@@ -447,27 +447,27 @@ test "look opens spaced paths and locations without editing the source pane" {
const look_node = Node.of(source.serial, .look);
const revision = source.file.?.revision;
const undo_len = source.file.?.history.undo_len;
- source.cur_col = 3;
+ source.body.cur_col = 3;
var clicked: [4200]u8 = undefined;
try testing.expectEqual(Status.ok, wr(p, look_node, try std.fmt.bufPrint(&clicked, "{s}:2:3\n", .{path})).reply.status);
const opened = p.panes[p.active].?;
try testing.expect(opened != source);
try testing.expectEqualStrings(path, opened.file.?.path);
try testing.expectEqualStrings("first\nsecond\nthird\n", opened.file.?.content);
- try testing.expectEqual(@as(i32, 1), opened.cur_row);
- try testing.expectEqual(@as(i32, 2), opened.cur_col);
+ try testing.expectEqual(@as(i32, 1), opened.body.cur_row);
+ try testing.expectEqual(@as(i32, 2), opened.body.cur_col);
try testing.expectEqualStrings("source stays intact\n", source.file.?.content);
try testing.expectEqual(revision, source.file.?.revision);
try testing.expectEqual(undo_len, source.file.?.history.undo_len);
- try testing.expectEqual(@as(i32, 3), source.cur_col);
+ try testing.expectEqual(@as(i32, 3), source.body.cur_col);
var expected: [16]u8 = undefined;
try testing.expectEqualStrings(try std.fmt.bufPrint(&expected, "{d}\n", .{opened.serial}), rd(p, root_look, 0, 4096).bytes);
p.active = 0;
try testing.expectEqual(Status.ok, wr(p, root_look, try std.fmt.bufPrint(&clicked, "{s}:3:2\n", .{path})).reply.status);
try testing.expect(p.panes[p.active].? == opened);
- try testing.expectEqual(@as(i32, 2), opened.cur_row);
- try testing.expectEqual(@as(i32, 1), opened.cur_col);
+ try testing.expectEqual(@as(i32, 2), opened.body.cur_row);
+ try testing.expectEqual(@as(i32, 1), opened.body.cur_col);
try testing.expectEqualStrings(try std.fmt.bufPrint(&expected, "{d}\n", .{opened.serial}), rd(p, root_look, 0, 4096).bytes);
}