diff options
author | bptato <nincsnevem662@gmail.com> | 2022-12-15 21:41:51 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-12-15 21:41:51 +0100 |
commit | e0435743807c6f0c3b1d04cc89089c0528c9b33b (patch) | |
tree | a6ce721bc9bdd8f9ef2bdbf5d999748d4bcfe1e0 /src/layout | |
parent | 15815d7218927582538e48a3542b995031ff0b79 (diff) | |
download | chawan-e0435743807c6f0c3b1d04cc89089c0528c9b33b.tar.gz |
Fix tab width in pre
Diffstat (limited to 'src/layout')
-rw-r--r-- | src/layout/engine.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim index 6a1e6e5c..a122b7fa 100644 --- a/src/layout/engine.nim +++ b/src/layout/engine.nim @@ -292,6 +292,8 @@ proc processWhitespace(state: var InlineState, c: char) = of WHITESPACE_PRE_LINE, WHITESPACE_PRE, WHITESPACE_PRE_WRAP: if c == '\n': state.ictx.flushLine(state.computed, state.maxwidth) + elif c == '\t': + state.ictx.whitespacenum = (state.ictx.whitespacenum div 8 + 1) * 8 else: inc state.ictx.whitespacenum |