summaryrefslogtreecommitdiff
path: root/core/jj.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/jj.zig')
-rw-r--r--core/jj.zig12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/jj.zig b/core/jj.zig
index ed4d7e2a..1ec1a0dc 100644
--- a/core/jj.zig
+++ b/core/jj.zig
@@ -1822,10 +1822,11 @@ fn paintLanes(p: *Pardes, s: *pardes.Surface, pane: *Pane, r: pardes.Rect, tx: u
} else if (level < cells) {
var style = s.at(first + @as(u16, @intCast(level)), y).style;
style.fg = .{ .rgb = rgb };
- // An arrow: the lane, a shaft, a head at the text (`▎─→`);
- // from the last level, a bent one.
+ // An arrow: the lane bent into a shaft and a head at the text
+ // (`╰─→`, the user's choice of 2026-11-23 over `▎─→`); from
+ // the last level, where there is one cell, a bent arrow.
const at: u16 = @intCast(level);
- s.set(first + at, y, if (!arrow) "\u{258e}" else if (at + 1 == cells) "\u{21b3}" else "\u{258e}", style);
+ s.set(first + at, y, if (!arrow) "\u{258e}" else if (at + 1 == cells) "\u{21b3}" else "\u{2570}", style);
if (arrow) for (at + 1..cells) |c| s.set(first + @as(u16, @intCast(c)), y, if (c + 1 == cells) "\u{2192}" else "\u{2500}", style);
}
}
@@ -2382,9 +2383,10 @@ test "Changes draws what the text has not where it stood, as ghost rows: a line
};
try testing.expectEqual(pins.len, n);
} else for (0..levels) |level| {
- // `▎` a lane; an arrow: its lane, a shaft, a head (`▎─→`).
+ // `▎` a lane; an arrow: its lane bent, a shaft, a head (`╰─→`).
const cell = s.at(first + @as(u16, @intCast(level)), y);
- const glyph = if (level < pins.len) "\u{258e}" else if (arrow == null) " " else if (level + 1 == levels) "\u{2192}" else "\u{2500}";
+ const bent = arrow != null and arrow.? == level;
+ const glyph = if (level < pins.len) (if (!bent) "\u{258e}" else if (level + 1 == levels) "\u{21b3}" else "\u{2570}") else if (arrow == null) " " else if (level + 1 == levels) "\u{2192}" else "\u{2500}";
try testing.expectEqualStrings(glyph, cell.grapheme());
const pin = if (level < pins.len) pins[level] - '0' else pins[arrow orelse 0] - '0';
if (!std.mem.eql(u8, glyph, " ")) try testing.expectEqual(pardes.Color{ .rgb = colours[pin] }, cell.style.fg);