aboutsummaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-07-20 21:17:14 +0200
committerbptato <nincsnevem662@gmail.com>2022-07-20 21:17:14 +0200
commit8756b053abda176204fc02957d0f6614771e35a8 (patch)
tree2eb23f98585ab1b42117592959297798e62e82c7 /src/render
parent16d9510050588f84a6b75298280ed9e177cd791c (diff)
downloadchawan-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.nim8
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)