summaryrefslogtreecommitdiff
path: root/src/mini.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/mini.zig')
-rw-r--r--src/mini.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mini.zig b/src/mini.zig
index 9f7d865d..91870674 100644
--- a/src/mini.zig
+++ b/src/mini.zig
@@ -167,7 +167,7 @@ pub fn open(p: *Pardes, id: usize, argument: []const u8) !void {
file.syntax_dirty = false;
Output.resetBody(p, pane);
}
- p.active = i;
+ p.view().active = i;
return;
}
const free = p.freeSlot() orelse return error.NoPaneSlots;
@@ -187,7 +187,7 @@ pub fn open(p: *Pardes, id: usize, argument: []const u8) !void {
};
pane.body.cur_pinned = true;
exec.placeNew(p, id, id, free, .doc);
- p.active = free;
+ p.view().active = free;
}
test "Mini maps every braille dot and partial line group" {
@@ -287,13 +287,13 @@ test "Mini publishes only complete snapshots and content replacement drops metad
const source = try p.setTestFile("untouched\n");
const free = p.freeSlot();
open(p, 0, path) catch |err| {
- try std.testing.expectEqual(@as(usize, 0), p.active);
+ try std.testing.expectEqual(@as(usize, 0), p.view().active);
try std.testing.expectEqual(free, p.freeSlot());
try std.testing.expectEqual(source, p.panes[0].?);
try std.testing.expectEqualStrings("untouched\n", source.file.?.content);
return err;
};
- const file = &p.panes[p.active].?.file.?;
+ const file = &p.panes[p.view().active].?.file.?;
try std.testing.expectEqualStrings("⠉\n", file.content);
try std.testing.expectEqualStrings(path, file.mini.?.source);
const replacement = try gpa.dupe(u8, "plain\n");