summaryrefslogtreecommitdiff
path: root/src/Core.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Core.zig')
-rw-r--r--src/Core.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Core.zig b/src/Core.zig
index 55848aa9..62f54416 100644
--- a/src/Core.zig
+++ b/src/Core.zig
@@ -389,8 +389,8 @@ scratch: std.heap.ArenaAllocator,
/// that still own their loop pass their own arena to `render` instead.
frame_arena: std.heap.ArenaAllocator,
/// the terminal motion surface, memoized against the pane it was built
-/// for — see panes.terminal.RowsCache for the lifetime rule
-shell_rows: pardes.panes.terminal.RowsCache = .{},
+/// for — see edit.RowsCache for the lifetime rule
+shell_rows: pardes.edit.RowsCache = .{},
/// Finished command panes' output, and whether it is a diff
/// (File.DiffOutput).
diff_output: pardes.panes.File.DiffOutput = .{},
@@ -2741,7 +2741,7 @@ test "a command of several lines keeps its tag one row, and its echo does not st
_ = exec.execute(p, 1, two);
while (p.nextEffect()) |_| {}
_ = try p.render(frame.allocator());
- const body = try pardes.panes.terminal.screenTextAlloc(pane, gpa);
+ const body = try pardes.Term.scrollback(pane.terminal, gpa);
defer gpa.free(body);
try std.testing.expect(std.mem.indexOf(u8, body, "% def greet(name):\n return name") != null);
}
@@ -3080,7 +3080,7 @@ test "a command pane shows how its command ended, and the next command there run
const pane = p.panes[dst].?;
// Its first command is echoed as every later one is.
{
- const first = try pardes.panes.terminal.screenTextAlloc(pane, gpa);
+ const first = try pardes.Term.scrollback(pane.terminal, gpa);
defer gpa.free(first);
try std.testing.expect(std.mem.startsWith(u8, first, "% make -j8"));
}
@@ -3120,7 +3120,7 @@ test "a command pane shows how its command ended, and the next command there run
respawned = true;
};
try std.testing.expect(respawned);
- const body = try pardes.panes.terminal.screenTextAlloc(pane, gpa);
+ const body = try pardes.Term.scrollback(pane.terminal, gpa);
defer gpa.free(body);
const said = std.mem.indexOf(u8, body, "compiled") orelse return error.OutputLost;
const ended = std.mem.indexOf(u8, body, "exit 2") orelse return error.ExitLost;
@@ -3932,14 +3932,14 @@ test "leaving tty hides the prompt and keeps the command typed at it" {
const rowOf = struct {
fn at(pp: *Pardes, pane: *Pane, needle: []const u8) ?[]const u8 {
- const rows = pardes.panes.terminal.shellRows(pp, pane) catch return null;
+ const rows = pardes.edit.shellRows(pp, pane) catch return null;
for (rows) |r| if (std.mem.indexOf(u8, r, needle) != null) return r;
return null;
}
}.at;
const bodyRowOf = struct {
fn at(pp: *Pardes, pane: *Pane, needle: []const u8) ?[]const u8 {
- const body = pardes.panes.terminal.bodyText(pp.scratch.allocator(), pane) catch return null;
+ const body = @import("body_layer.zig").bodyText(pp.scratch.allocator(), pane) catch return null;
var it = std.mem.splitScalar(u8, body, '\n');
while (it.next()) |r| if (std.mem.indexOf(u8, r, needle) != null) return r;
return null;
@@ -3994,7 +3994,7 @@ test "entering tty walks the shell cursor to the column clicked past the prompt"
p.shell_rows.stale = true;
// The command shows LEFT-HUGGED, so its column 3 is the '3'...
- const rows = try pardes.panes.terminal.shellRows(p, sp);
+ const rows = try pardes.edit.shellRows(p, sp);
var row: i32 = 0;
const at = for (rows, 0..) |r, i| {
if (std.mem.indexOf(u8, r, "0123456789") != null) break i;