diff options
author | bptato <nincsnevem662@gmail.com> | 2022-07-20 21:17:14 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-07-20 21:17:14 +0200 |
commit | 8756b053abda176204fc02957d0f6614771e35a8 (patch) | |
tree | 2eb23f98585ab1b42117592959297798e62e82c7 /src/render | |
parent | 16d9510050588f84a6b75298280ed9e177cd791c (diff) | |
download | chawan-8756b053abda176204fc02957d0f6614771e35a8.tar.gz |
Clean up vertical line box alignment code
This fixes the non-standard alignment of inline blocks. While we're at it, renamed "inline rows" to line boxes, as that's pretty much what they are now.
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/renderdocument.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render/renderdocument.nim b/src/render/renderdocument.nim index 196c1496..d2239416 100644 --- a/src/render/renderdocument.nim +++ b/src/render/renderdocument.nim @@ -206,15 +206,15 @@ proc renderBlockContext(grid: var FlexibleGrid, ctx: BlockContext, x, y: int, te proc renderInlineContext(grid: var FlexibleGrid, ctx: InlineContext, x, y: int, term: TermAttributes) = let x = x + ctx.offset.x let y = y + ctx.offset.y - for row in ctx.rows: - let x = x + row.offset.x - let y = y + row.offset.y + for line in ctx.lines: + let x = x + line.offset.x + let y = y + line.offset.y let r = y div term.ppl while grid.len <= r: grid.addLine() - for atom in row.atoms: + for atom in line.atoms: if atom of InlineBlock: let iblock = InlineBlock(atom) grid.renderBlockContext(iblock.bctx, x + iblock.offset.x, y + iblock.offset.y, term) |