about summary refs log tree commit diff stats
path: root/src/server
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-03-03 23:10:44 +0100
committerbptato <nincsnevem662@gmail.com>2024-03-03 23:18:25 +0100
commit15d5ad451bdc456e80e7468a76fb2eac6feb4a4e (patch)
tree941481cc2795e1dd191b928737a323362e298b16 /src/server
parentfb04a7e96ff68b4516ea483ca4fbe9c4976bb7d2 (diff)
downloadchawan-15d5ad451bdc456e80e7468a76fb2eac6feb4a4e.tar.gz
strwidth, renderdocument: small refactoring
* put attrs pointer in state
* simplify width()
* use unsigned int as ptint to avoid UB
Diffstat (limited to 'src/server')
-rw-r--r--src/server/buffer.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/buffer.nim b/src/server/buffer.nim
index 32592076..749c31d8 100644
--- a/src/server/buffer.nim
+++ b/src/server/buffer.nim
@@ -641,7 +641,7 @@ proc do_reshape(buffer: Buffer) =
     buffer.prevStyled = nil
   let styledRoot = buffer.document.applyStylesheets(uastyle,
     buffer.userstyle, buffer.prevStyled)
-  buffer.lines.renderDocument(buffer.bgcolor, styledRoot, buffer.attrs)
+  buffer.lines.renderDocument(buffer.bgcolor, styledRoot, addr buffer.attrs)
   buffer.prevStyled = styledRoot
 
 proc processData0(buffer: Buffer, data: openArray[char]): bool =