diff options
Diffstat (limited to 'dev/tui')
| -rw-r--r-- | dev/tui/tui.zig | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index f7b9cae8..8cb06b05 100644 --- a/dev/tui/tui.zig +++ b/dev/tui/tui.zig @@ -2244,7 +2244,7 @@ fn trailCells(arena: std.mem.Allocator, shown: *const pardes.Surface, trail: *Ju if (region.kind == .body and cursor.x >= region.rect.x and cursor.x < @as(u32, region.rect.x) + region.rect.w and cursor.y >= region.rect.y and cursor.y < @as(u32, region.rect.y) + region.rect.h) break region.rect; } else return shown; - const ink = shown.chrome.fg orelse .{ 0xcc, 0xcc, 0xcc }; + const ink = shown.chrome.fg orelse pardes.colors.null_text; const page = shown.chrome.page orelse pardes.colors.null_page; const out = try arena.create(pardes.Surface); out.* = shown.*; @@ -3361,13 +3361,14 @@ test "a terminal client's view, opened from a window's, wraps a tag at its own w if (region.kind != .tag) continue; for (region.rect.y..region.rect.y + region.rect.h) |y| { for (s.cells[y * s.cols ..][region.rect.x..][0..region.rect.w]) |cell| try shown.appendSlice(gpa, if (cell.len == 0) " " else cell.grapheme()); - try shown.append(gpa, '\n'); } } // Each of its words shows: wrapped at its rows' width, none lost - // between a row cut short and the next. + // between a row cut short and the next (its rows read on, as a word + // the wrap cuts runs on to the next). + errdefer std.debug.print("{s}\n", .{shown.items}); for (&words) |*w| if (std.mem.indexOf(u8, shown.items, w) == null) { - std.debug.print("{s} is not shown in the tag:\n{s}\n", .{ w, shown.items }); + std.debug.print("{s} is not shown in the tag\n", .{w}); return error.TestUnexpectedResult; }; } |
