summaryrefslogtreecommitdiff
path: root/src/keys.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/keys.zig')
-rw-r--r--src/keys.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/keys.zig b/src/keys.zig
index c4651be7..bdf8a454 100644
--- a/src/keys.zig
+++ b/src/keys.zig
@@ -549,7 +549,7 @@ test "Esc back into a tty leaves its view at the prompt" {
p.update(.{ .output = .{ .pane = @intCast(shell), .bytes = std.fmt.bufPrint(&buf, "line {d}\r\n", .{i}) catch unreachable } });
}
p.sync();
- const live = sp.terminal.?.vt.screens.active.pages.scrollbar().offset;
+ const live = pardes.Term.grid(sp.terminal).offset;
try std.testing.expect(live > 0);
p.update(.{ .key = .{ .cp = Key.escape } }); // shell-prompt heuristic: out to the doc
@@ -558,7 +558,7 @@ test "Esc back into a tty leaves its view at the prompt" {
p.sync();
try std.testing.expectEqual(shell, p.view().active);
- try std.testing.expectEqual(live, sp.terminal.?.vt.screens.active.pages.scrollbar().offset);
+ try std.testing.expectEqual(live, pardes.Term.grid(sp.terminal).offset);
}
test "Del from a key asks which neighbour takes the rows; nothing else asks" {
@@ -803,7 +803,7 @@ test "raw tty forwards Ctrl letters and former global shortcuts to the child" {
}
p.update(.{ .key = .{ .cp = Key.up } });
try std.testing.expectEqualStrings("\x1b[A", test_api.ptyBytes(p, null, &buf));
- p.panes[0].?.terminal.?.vt.modes.set(.cursor_keys, true);
+ _ = pardes.Term.feed(p.panes[0].?.terminal.?, "\x1b[?1h", &.{}, &.{}, &.{}); // DECCKM
p.update(.{ .key = .{ .cp = Key.up } });
try std.testing.expectEqualStrings("\x1bOA", test_api.ptyBytes(p, null, &buf));
p.update(.{ .key = .{ .cp = Key.left, .ctrl = true } });