summaryrefslogtreecommitdiff
path: root/src/keys.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/keys.zig')
-rw-r--r--src/keys.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/keys.zig b/src/keys.zig
index 264eb95e..2906e870 100644
--- a/src/keys.zig
+++ b/src/keys.zig
@@ -143,7 +143,7 @@ pub fn answerQuestion(p: *Pardes, id: usize, choice: ?u8) bool {
if (choice == 'k') exec.runBuiltin(p, .Del, id, "", "k");
if (choice == 'j') exec.runBuiltin(p, .Del, id, "", "j");
// Asked from window mode (`d`): the outline goes with the rows.
- if (p.window_pick == id and p.panes[id] == null) p.window_pick = if (p.header_focus) null else p.active;
+ if (p.window_pick == id and p.panes[id] == null) p.window_pick = if (p.header != null) null else p.active;
},
else => return false,
}
@@ -260,7 +260,7 @@ pub fn handleKey(p: *Pardes, key: Key) void {
const nt = p.newShell(free, "") catch return;
nt.greet = true;
// From a tag, as a 9P new is: acme's t->w == nil.
- exec.placeNew(p, p.active, if (p.header_focus) null else p.active, free, .shell);
+ exec.placeNew(p, p.active, if (p.header != null) null else p.active, free, .shell);
return;
}
for (config.jump_keys) |jk| {
@@ -351,7 +351,7 @@ pub fn handleKey(p: *Pardes, key: Key) void {
};
const txt = shown[span[0]..span[1]];
// A column tag's command acts on that column, empty or not.
- p.exec_column = if (header != null) p.header_column else null;
+ p.exec_column = if (header != null) p.headerColumn() else null;
defer p.exec_column = null;
p.exec_header = header != null;
defer p.exec_header = false;
@@ -796,7 +796,7 @@ test "s in a header selects in the header's own text" {
// the prompt takes the keys while the header keeps the keyboard
p.update(.{ .key = .{ .cp = 'c', .text = "col" } });
p.update(.{ .key = .{ .cp = Key.enter } });
- try std.testing.expect(p.header_focus and pane.prompt == .none);
+ try std.testing.expect(p.header != null and pane.prompt == .none);
var ranges: [Text.max_selections]modal.Selection = undefined;
const text = try edit.flatSurface(p, &p.global_tag);
const got = p.global_tag.ranges(text, 0, &ranges);