aboutsummaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-12-25 17:29:39 +0100
committerbptato <nincsnevem662@gmail.com>2021-12-25 17:29:39 +0100
commit9c688a75adcd647723a993f04cb964d62e7f05a4 (patch)
tree9de5e026d50f60d8869e269ad6ce479e59799915 /src/render
parentbfd634f845a8669a066ba55836e77d2d203959aa (diff)
downloadchawan-9c688a75adcd647723a993f04cb964d62e7f05a4.tar.gz
Refactor formatting, improve buffer cursor movement
Diffstat (limited to 'src/render')
-rw-r--r--src/render/renderdocument.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/render/renderdocument.nim b/src/render/renderdocument.nim
index c3ad6cfe..21ae0945 100644
--- a/src/render/renderdocument.nim
+++ b/src/render/renderdocument.nim
@@ -14,15 +14,15 @@ import utils/twtstr
func formatFromLine(line: CSSRowBox): Formatting =
result.fgcolor = line.color.cellColor()
if line.fontstyle in { FONT_STYLE_ITALIC, FONT_STYLE_OBLIQUE }:
- result.italic_on
+ result.italic = true
if line.fontweight > 500:
- result.bold_on
+ result.bold = true
if line.textdecoration == TEXT_DECORATION_UNDERLINE:
- result.underline_on
+ result.underline = true
if line.textdecoration == TEXT_DECORATION_OVERLINE:
- result.overline_on
+ result.overline = true
if line.textdecoration == TEXT_DECORATION_LINE_THROUGH:
- result.strike_on
+ result.strike = true
proc setRowBox(lines: var FlexibleGrid, line: CSSRowBox) =
var r: Rune