diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-03 23:10:44 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-03 23:18:25 +0100 |
commit | 15d5ad451bdc456e80e7468a76fb2eac6feb4a4e (patch) | |
tree | 941481cc2795e1dd191b928737a323362e298b16 /src/server | |
parent | fb04a7e96ff68b4516ea483ca4fbe9c4976bb7d2 (diff) | |
download | chawan-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.nim | 2 |
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 = |