about summary refs log tree commit diff stats
path: root/src/display
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-28 21:19:21 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-28 21:23:26 +0100
commitd91d1dda2ad1219b3b798eafc14151811ed9a1b3 (patch)
treef82d8da0763f0dbc62dedb2aa9aaa51114d2aad9 /src/display
parentb035e53d641d71fab89f92cd8d5188501be0d058 (diff)
downloadchawan-d91d1dda2ad1219b3b798eafc14151811ed9a1b3.tar.gz
Compile with styleCheck:usages
much better
Diffstat (limited to 'src/display')
-rw-r--r--src/display/term.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/display/term.nim b/src/display/term.nim
index 05d54f98..8e0f9544 100644
--- a/src/display/term.nim
+++ b/src/display/term.nim
@@ -262,7 +262,7 @@ proc correctContrast(term: Terminal, bgcolor, fgcolor: CellColor): CellColor =
           fgY = 255
     let newrgb = YUV(cast[uint8](fgY), fgcolor.U, fgcolor.V)
     case term.colormode
-    of TRUECOLOR:
+    of TRUE_COLOR:
       return cellColor(newrgb)
     of ANSI:
       return approximateANSIColor(newrgb, term.defaultForeground)
@@ -318,7 +318,7 @@ proc processFormat*(term: Terminal, format: var Format, cellf: Format): string =
   if cellf.fgcolor != format.fgcolor:
     var color = cellf.fgcolor
     if color.rgb:
-      assert term.colormode == TRUECOLOR
+      assert term.colormode == TRUE_COLOR
       let rgb = color.rgbcolor
       result &= SGR(38, 2, rgb.r, rgb.g, rgb.b)
     elif color == defaultColor:
@@ -328,13 +328,13 @@ proc processFormat*(term: Terminal, format: var Format, cellf: Format): string =
       if n < 8:
         result &= SGR(30 + n)
       else:
-        assert term.colormode in {TRUECOLOR, EIGHT_BIT}
+        assert term.colormode in {TRUE_COLOR, EIGHT_BIT}
         result &= SGR(38, 5, n)
 
   if cellf.bgcolor != format.bgcolor:
     var color = cellf.bgcolor
     if color.rgb:
-      assert term.colormode == TRUECOLOR
+      assert term.colormode == TRUE_COLOR
       let rgb = color.rgbcolor
       result &= SGR(48, 2, rgb.r, rgb.g, rgb.b)
     elif color == defaultColor:
@@ -344,7 +344,7 @@ proc processFormat*(term: Terminal, format: var Format, cellf: Format): string =
       if n < 8:
         result &= SGR(40 + n)
       else:
-        assert term.colormode in {TRUECOLOR, EIGHT_BIT}
+        assert term.colormode in {TRUE_COLOR, EIGHT_BIT}
         result &= SGR(48, 5, n)
 
   for flag in FormatFlags: