╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │539 │ │540 // emit this panel's grid as rows of text, coalescing adjacent cells that │ │541 // share a focus id and colors into one tag (a clickable span, a link, or a │ │542 - // plain colored span). cells covered by a child scroll are left blank. │ │542 + // plain colored span). cells under a child scroll keep only their background.│ │543 for (0..grid.size.height) |y| { │ │544 var cur_id: ?usize = null; │ │545 var cur_fg: ?Grid.Color = null; │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │547 var open_tag: ?CellTag = null; │ │548 var first = true; │ │549 for (0..grid.size.width) |x| { │ │550 - // a cell covered by a child scroll's viewport is drawn by that │ │551 - // scroll's own div; leave a blank here so the layout stays aligned. │ │550 + const cell = grid.cells.items[try grid.cells.at(.{ y, x })]; │ │551 + // a cell covered by a child scroll's viewport is drawn by that scroll's│ │552 + // own div, so blank its glyph and make it non-clickable here — but keep│ │553 + // its background, so the backdrop still shows through the scroll's │ │554 + // transparent div instead of a bare hole. │ │555 const covered_by_scroll = blk: { │ │556 for (direct.items) |id| { │ │557 const r = (focus.children.get(id) orelse continue).rect; │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │559 } │ │560 break :blk false; │ │561 }; │ │559 - if (covered_by_scroll) { │ │560 - if (open_tag) |t| try output.appendSlice(allocator, t.closeTag()); │ │561 - open_tag = null; │ │562 - cur_id = null; │ │563 - first = true; │ │564 - try output.append(allocator, ' '); │ │565 - continue; │ │566 - } │ │567 - │ │568 - const cell = grid.cells.items[try grid.cells.at(.{ y, x })]; │ │569 - // the focusable cell at (x, y) among this panel's own focusables (skipping any│ │570 - // that belong to a child scroll, whose cells are drawn in their own panel). │ │571 - const cell_id = blk: { │ │562 + // the focusable cell at (x, y) among this panel's own focusables (skipping │ │563 + // any that belong to a child scroll, whose cells are drawn in their own │ │564 + // panel); none for a covered cell. │ │565 + const cell_id = if (covered_by_scroll) null else blk: { │ │566 var iter = focus.children.iterator(); │ │567 while (iter.next()) |entry| { │ │568 const child = entry.value_ptr.*; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │575 } │ │576 break :blk null; │ │577 }; │ │584 - const fg = cell.style.fg; │ │578 + const fg = if (covered_by_scroll) null else cell.style.fg; │ │579 const bg = cell.style.bg; │ │580 │ │581 if (first or cell_id != cur_id or !colorEql(fg, cur_fg) or !colorEql(bg, cur_bg)) {│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │604 first = false; │ │605 } │ │606 │ │613 - try appendEscapedHtml(allocator, output, cell.rune orelse " "); │ │607 + try appendEscapedHtml(allocator, output, if (covered_by_scroll) " " else (cell.rune orelse " "));│ │608 } │ │609 if (open_tag) |t| try output.appendSlice(allocator, t.closeTag()); │ │610 try output.append(allocator, '\n'); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯