diff options
Diffstat (limited to 'core/draw.zig')
| -rw-r--r-- | core/draw.zig | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/core/draw.zig b/core/draw.zig index a459e3e9..685f67ea 100644 --- a/core/draw.zig +++ b/core/draw.zig @@ -1053,11 +1053,7 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, var lines: [MAX_TAG_ROWS][]const u8 = @splat(""); var split = std.mem.splitScalar(u8, shown.text, '\n'); for (0..top) |_| _ = split.next(); - var nlines: usize = 0; - for (lines[0..rows]) |*line| { - line.* = split.next() orelse continue; - nlines += 1; - } + for (lines[0..rows]) |*line| line.* = split.next() orelse continue; // The keyboard's caret, as a row and a byte offset in that row's // line: in the tag's own text when the tag has the keyboard, in the // path while a name is drafted. @@ -1084,18 +1080,6 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, const start = @min(line.len, panes.File.rawAtDisplay(p.settings.tab, line, pane.tag_scroll)); _ = s.print(tx, tag_y + @as(u16, @intCast(row)), tw, line[start..], text_style); } - // Out of rest the rows the tag keeps from rest under the head's own: - // the spines on through them, under the key cells (UX D5). - if (head) |h| if (top == 0 and nlines < rows and h.cells > 0) { - const first = lines[0]; - for (h.spans[0..h.cells]) |cell| { - const at = prefix_len + cell.lo; - if (at > first.len) break; - const col = panes.File.rawDisplayCol(p.settings.tab, first, at); - if (col >= tw) break; - for (nlines..rows) |row| s.set(tx + @as(u16, @intCast(col)), tag_y + @as(u16, @intCast(row)), "│", .{ .fg = .{ .rgb = inks.rule }, .bg = .{ .rgb = tag_bg }, .font_role = .tagline }); - } - }; // The pane's progress at its first row's right end, where the row has // room for it (SPEC §10.2); out of rest the head's right block is // there (UX D1). |
