about summary refs log tree commit diff stats
path: root/src/render
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-01-30 10:56:15 +0100
committerbptato <nincsnevem662@gmail.com>2022-01-30 10:56:15 +0100
commit87a47d56cca6ded5f5cd900a9bff2e4d8292629e (patch)
tree93cdc98e998575d1cfb7637f9cec33b7533b5cb3 /src/render
parentfb017f273dab1d63764269ca02700316919522f4 (diff)
downloadchawan-87a47d56cca6ded5f5cd900a9bff2e4d8292629e.tar.gz
Implement list-style-position
Diffstat (limited to 'src/render')
-rw-r--r--src/render/renderdocument.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/renderdocument.nim b/src/render/renderdocument.nim
index 8c34e273..e6020c6e 100644
--- a/src/render/renderdocument.nim
+++ b/src/render/renderdocument.nim
@@ -32,7 +32,7 @@ proc setRowWord(lines: var FlexibleGrid, word: InlineWord, x, y: int, term: Term
 
   var x = (x + word.relx) div term.ppc
   var i = 0
-  while x < 0:
+  while x < 0 and i < word.str.len:
     fastRuneAt(word.str, i, r)
     x += r.width()
   let linestr = word.str.substr(i)