about summary refs log tree commit diff stats
path: root/src/display
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-01-23 14:08:36 +0100
committerbptato <nincsnevem662@gmail.com>2024-01-23 14:08:36 +0100
commit2ff8f87f82cf971160eeced2ded6189d19e72162 (patch)
treef6ebd7d126b0e4c929f364e8c6c3686656c4f946 /src/display
parent9e0a2ace1f297a93c5214228a376bd4ad67086f4 (diff)
downloadchawan-2ff8f87f82cf971160eeced2ded6189d19e72162.tar.gz
Remove newFormat
Pointless; it just returned a default zero-initialized object.
Diffstat (limited to 'src/display')
-rw-r--r--src/display/term.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/display/term.nim b/src/display/term.nim
index b3f98230..cd2df219 100644
--- a/src/display/term.nim
+++ b/src/display/term.nim
@@ -322,7 +322,7 @@ proc processFormat*(term: Terminal, format: var Format, cellf: Format): string =
   if cellf.fgcolor != format.fgcolor and cellf.fgcolor == defaultColor or
       cellf.bgcolor != format.bgcolor and cellf.bgcolor == defaultColor:
     result &= term.resetFormat()
-    format = newFormat()
+    format = Format()
 
   if cellf.fgcolor != format.fgcolor:
     var color = cellf.fgcolor
@@ -397,7 +397,7 @@ proc processOutputString*(term: Terminal, str: string, w: var int): string =
     return es.readAll()
 
 proc generateFullOutput(term: Terminal, grid: FixedGrid): string =
-  var format = newFormat()
+  var format = Format()
   result &= term.cursorGoto(0, 0)
   result &= term.resetFormat()
   result &= term.clearDisplay()
@@ -441,7 +441,7 @@ proc generateSwapOutput(term: Terminal, grid, prev: FixedGrid): string =
         result &= term.cursorGoto(cx, y)
         vy = y
       result &= term.resetFormat()
-      var format = newFormat()
+      var format = Format()
       for x in cx ..< grid.width:
         while w < x: # if previous cell had no width, catch up with x
           result &= ' '