diff options
Diffstat (limited to 'src/draw.zig')
| -rw-r--r-- | src/draw.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/draw.zig b/src/draw.zig index e8276904..830f10df 100644 --- a/src/draw.zig +++ b/src/draw.zig @@ -471,7 +471,7 @@ fn paintHeaders(p: *Pardes, s: *Surface) !void { // global tagbar: full width, top rows — unless a native shell has // taken its commands over, in which case the rows are not ours to draw if (s.region(.workspace_tag, Region.none)) |region| { - const top = if (p.header_focus and p.header_column == null) p.header_top else 0; + const top = if (p.header != null and p.headerColumn() == null) p.header_top else 0; const layer = &s.tag_layers[MAX_PANES + MAX_COLS]; var viewport = region.rect; const inset = @min(TAG_TEXT_INSET, viewport.w); @@ -500,7 +500,7 @@ fn paintHeaders(p: *Pardes, s: *Surface) !void { s.fill(p.col_x[c], region.rect.y + 1, grip, column_rows -| 1, .{ .bg = .{ .rgb = bg }, .font_role = .tagline }); s.fill(p.col_x[c] + grip, region.rect.y, inset - grip, column_rows, .{ .bg = .{ .rgb = bg }, .font_role = .tagline }); } - const top = if (p.header_focus and p.header_column == c) p.header_top else 0; + const top = if (p.header != null and p.headerColumn() == c) p.header_top else 0; const layer = &s.tag_layers[MAX_PANES + c]; try renderHeaderLayer(p, layer, .column, @intCast(c), region.rect, tagline.columnTag(p, c), top, bg, fg); if (p.col_x[c] < s.cols) joinHeaderRows(s, layer, fg); @@ -597,9 +597,9 @@ fn renderHeaderLayer(p: *Pardes, layer: *pardes.Layer, kind: TagKind, id: u16, v // A notice band carries a PANE id, not a column index, so it must not // answer to the column being edited -- that would scroll and select // its text with the column tag's offsets and give it a second caret. - const editing: ?*Text = if (p.header_focus and switch (kind) { - .workspace => p.header_column == null, - .column => p.header_column == id, + const editing: ?*Text = if (p.header != null and switch (kind) { + .workspace => p.headerColumn() == null, + .column => p.headerColumn() == id, .pane, .notice, .body => false, }) tagline.focusedHeader(p) else null; const scroll = if (editing != null) p.header_scroll else 0; @@ -710,7 +710,7 @@ fn joinPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r layer.rows = rows; layer.context_rows = 0; layer.bg = if (p.window_pick == id) p.theme().sel_bg else if (active and p.settings.focus_tint) chrome.tag_active_bg else chrome.tag_bg; - layer.cursor = if (p.header_focus) null else if (temporary.cursor) |cursor| + layer.cursor = if (p.header != null) null else if (temporary.cursor) |cursor| .{ .x = cursor.x - TAG_TEXT_INSET, .y = cursor.y, .bar = cursor.bar } else null; |
