summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index 5d889c86..eb09b1f2 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -8851,6 +8851,21 @@ test "Shift-Esc backs out to the previous pane in every mode, never into raw" {
try std.testing.expect(p.active != 0);
}
+test "Esc in a column or the workspace tag gives the keyboard back to a pane, as Shift-Esc does" {
+ if (platform == .web) return;
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 80, .rows = 24, .file = "mise.toml" });
+ defer p.deinit();
+ p.update(.{ .key = .{ .cp = 'n', .alt = true } }); // a pane to go back to
+ for ([_]?usize{ 0, null }) |column| {
+ tagline.enterHeader(p, column);
+ try std.testing.expect(tagline.focusedHeader(p) != null);
+ const was = p.active;
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expect(tagline.focusedHeader(p) == null);
+ try std.testing.expect(p.active != was);
+ }
+}
+
test "window mode moves an outline and focuses it on Enter, Esc or a label" {
const p = try Pardes.init(std.testing.allocator, .{ .cols = 120, .rows = 30 });
defer p.deinit();