diff options
author | bptato <nincsnevem662@gmail.com> | 2023-07-27 17:35:56 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-07-27 17:35:56 +0200 |
commit | 4c0d69b01d20e30439c3e46c19a9af2e633c5681 (patch) | |
tree | d9fbd3c6814ffad0cd8539bccc33abe485c21c2a /src | |
parent | 1e0506adb18b38fb7b187a4d81e39b8d6a1e23a4 (diff) | |
download | chawan-4c0d69b01d20e30439c3e46c19a9af2e633c5681.tar.gz |
layout: fix incorrect parentheses
In the tab width case, only whitespacenum was being divided instead of charwidth + whitespacenum, which resulted in an exponential growth of both charwidth and whitespacenum.
Diffstat (limited to 'src')
-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 812c05e8..4fa61dff 100644 --- a/src/layout/engine.nim +++ b/src/layout/engine.nim @@ -402,7 +402,7 @@ proc processWhitespace(state: var InlineState, c: char) = elif c == '\t': let prev = state.ictx.charwidth state.ictx.charwidth = ((state.ictx.charwidth + - state.ictx.whitespacenum div 8) + 1) * 8 - state.ictx.whitespacenum + state.ictx.whitespacenum) div 8 + 1) * 8 - state.ictx.whitespacenum state.ictx.whitespacenum += state.ictx.charwidth - prev else: inc state.ictx.whitespacenum |