about summary refs log tree commit diff stats
path: root/src/layout
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-11-23 14:08:37 +0100
committerbptato <nincsnevem662@gmail.com>2021-11-23 14:08:37 +0100
commita413a3115f242395ef1149c263d3280e62f1608e (patch)
tree84d3d0e813f5695711a3e29dec3f74f9ddb6df52 /src/layout
parentfbac38a0b0ce15954f8ba441a7a1adfb67dd8a80 (diff)
downloadchawan-a413a3115f242395ef1149c263d3280e62f1608e.tar.gz
Add margin to p, fix inline wrapping
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/engine.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim
index 6ca232b7..0fbaf882 100644
--- a/src/layout/engine.nim
+++ b/src/layout/engine.nim
@@ -116,7 +116,7 @@ proc processInlineBox(parent: CSSBox, str: string): CSSBox =
       ibox.context.whitespace = false
       fastRuneAt(str, i, r)
       rw = r.width()
-      if rowbox.width + r.width() > ibox.width:
+      if fromx + rowbox.width + r.width() > ibox.width:
         inlineWrap(ibox, rowi, fromx, rowbox)
 
     rowbox.width += rw