summaryrefslogtreecommitdiff
path: root/core/draw.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/draw.zig')
-rw-r--r--core/draw.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/draw.zig b/core/draw.zig
index 2553d5be..b666fc15 100644
--- a/core/draw.zig
+++ b/core/draw.zig
@@ -1122,11 +1122,11 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane,
if (pane.file != null and pane.trail.n > 0 and !pardes.Trail.outOfRest(p, pane)) {
const kept = tagline.folded(p, pane).whole;
const t = &pane.trail;
- const first: usize = @intFromBool(t.steps[0] == .owner);
- if (t.isFolded(first, kept)) {
- const fold = t.spanOf(first, kept);
+ // Each run of folded places' `+N` (UX L'1: words never fold).
+ for (0..t.backs()) |i| if (t.isFolded(i, kept) and !(i > 0 and t.isFolded(i - 1, kept))) {
+ const fold = t.spanOf(i, kept);
inkTag(p, s, shown, lines[0..rows], top, tx, tag_y, tw, fold[0], @min(fold[1], first_line.len), inks.dim, false);
- }
+ };
if (t.walked()) |i| if (!t.isFolded(i, kept)) {
const word = t.spanOf(i, kept);
inkTag(p, s, shown, lines[0..rows], top, tx, tag_y, tw, word[0], @min(word[1], first_line.len), chrome.roles.key, true);