about summary refs log tree commit diff stats
path: root/src/io/cell.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-12-17 18:38:32 +0100
committerbptato <nincsnevem662@gmail.com>2021-12-17 18:44:44 +0100
commitef4604ba8f494a2997a744a0b04732dc686c46ea (patch)
tree77a67abb1bc31a5ad86966729ba56bb307083827 /src/io/cell.nim
parentd430a83ab3e971b816581839fbdf860a293242e8 (diff)
downloadchawan-ef4604ba8f494a2997a744a0b04732dc686c46ea.tar.gz
More code formatting consistency
Diffstat (limited to 'src/io/cell.nim')
-rw-r--r--src/io/cell.nim16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/io/cell.nim b/src/io/cell.nim
index d4e67196..5bdbfb50 100644
--- a/src/io/cell.nim
+++ b/src/io/cell.nim
@@ -156,7 +156,7 @@ proc addLine*(grid: var FlexibleGrid) =
 proc addFormat*(grid: var FlexibleGrid, y: int, format: Formatting) =
   grid[y].formats.add(FormattingCell(formatting: format, pos: grid[y].len))
 
-proc addFormat*(grid: var FlexibleGrid, y: int, pos: int, format: Formatting, nodes: seq[Node]) =
+proc addFormat*(grid: var FlexibleGrid, y, pos: int, format: Formatting, nodes: seq[Node]) =
   grid[y].formats.add(FormattingCell(formatting: format, nodes: nodes, pos: pos))
 
 proc addCell*(grid: var FlexibleGrid, y: int, r: Rune) =
@@ -213,19 +213,19 @@ proc parseAnsiCode*(formatting: var Formatting, buf: string, fi: int): int =
           of 0:
             formatting = newFormatting()
           of 1:
-            formatting.bold = true
+            formatting.bold_on
           of 3:
             formatting.italic_on
           of 4:
-            formatting.underline = true
+            formatting.underline_on
           of 9:
-            formatting.strike = true
+            formatting.strike_on
           of 22:
-            formatting.bold = false
+            formatting.bold_off
           of 23:
             formatting.italic_off
           of 29:
-            formatting.strike = false
+            formatting.strike_off
           of 30..37:
             formatting.fgcolor = CellColor(rgb: false, color: uint8(ip[pi]))
           of 38:
@@ -271,9 +271,9 @@ proc parseAnsiCode*(formatting: var Formatting, buf: string, fi: int): int =
           of 49:
             formatting.bgcolor = defaultColor
           of 53:
-            formatting.overline = true
+            formatting.overline_on
           of 55:
-            formatting.overline = false
+            formatting.overline_off
           else: discard
           inc pi
       except ValueError: discard