summaryrefslogtreecommitdiff
path: root/src/config.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.zig')
-rw-r--r--src/config.zig9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/config.zig b/src/config.zig
index f898df11..6d0cf0a6 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -49,6 +49,7 @@ pub const leader_path = paths: {
.Togglettymode = null,
.Collapse = null,
.Kill = null,
+ .Exit = null,
.ClipYank = "y",
.ClipYankMain = "Y",
.ClipPaste = "p",
@@ -160,8 +161,9 @@ pub const leader_path = paths: {
break :paths table;
};
-test "Space-k is unbound while Kill and other k chords remain available" {
+test "Space-k is unbound while Exit, Kill and other k chords remain available" {
try std.testing.expect(leader_path.get(.Kill) == null);
+ try std.testing.expect(leader_path.get(.Exit) == null);
try std.testing.expectEqualStrings("wk", leader_path.get(.Up).?);
try std.testing.expectEqualStrings("lk", leader_path.get(.Hover).?);
try std.testing.expectEqualStrings("d", leader_path.get(.Del).?);
@@ -183,7 +185,10 @@ test "Space-k is unbound while Kill and other k chords remain available" {
while (p.nextEffect()) |effect| try std.testing.expect(effect != .quit);
p.update(.{ .key = .{ .cp = 'k' } });
try std.testing.expectEqual(@as(i32, 0), pane.body.cur_row);
+ // Kill stops commands and never quits; Exit quits.
try std.testing.expect(p.executeBuiltinLine(p.active, "Kill"));
+ try std.testing.expect(!p.quit);
+ try std.testing.expect(p.executeBuiltinLine(p.active, "Exit"));
try std.testing.expect(p.quit);
}
@@ -237,7 +242,7 @@ pub const child_term = "xterm-256color";
pub const child_colorterm = "truecolor";
pub const child_term_program = "pardes";
-pub const topbar_str = "Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill";
+pub const topbar_str = "Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Exit";
pub const pane_builtins_str = "Tty Collapse Del";
pub const pdf_pane_builtins_str = "Tty PdfSections PdfTint Collapse Del";