diff options
author | bptato <nincsnevem662@gmail.com> | 2022-01-22 19:03:56 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-01-22 19:03:56 +0100 |
commit | faca2b8134f5a2d77fd3162ce8b8166c9361d943 (patch) | |
tree | 5ace8e5cf9484b8c15c0c8b875869b217c6c657c | |
parent | 9e04a6cca10fe934ae6ad101c2f35d18a7d712b2 (diff) | |
download | chawan-faca2b8134f5a2d77fd3162ce8b8166c9361d943.tar.gz |
Fix word overflow bug
-rw-r--r-- | src/layout/engine.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim index f45181dc..19dd303c 100644 --- a/src/layout/engine.nim +++ b/src/layout/engine.nim @@ -57,7 +57,7 @@ proc addAtom(ictx: InlineContext, atom: InlineAtom, maxwidth: int, specified: CS # Line wrapping if specified{"white-space"} notin {WHITESPACE_NOWRAP, WHITESPACE_PRE}: - if specified{"word-break"} == WORD_BREAK_NORMAL and ictx.thisrow.width + atom.width > maxwidth: + if specified{"word-break"} == WORD_BREAK_NORMAL and ictx.thisrow.width + atom.width + shift > maxwidth: ictx.finishRow() if not whitespacepre: # No whitespace on newline |