about summary refs log tree commit diff stats
path: root/src/io/cell.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/io/cell.nim')
-rw-r--r--src/io/cell.nim8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/io/cell.nim b/src/io/cell.nim
index 50094e88..983c5b4d 100644
--- a/src/io/cell.nim
+++ b/src/io/cell.nim
@@ -4,7 +4,7 @@ import types/color
 import utils/twtstr
 
 type
-  Cell* = object of RootObj
+  Formatting* = object
     fgcolor*: CellColor
     bgcolor*: CellColor
     italic*: bool
@@ -13,6 +13,9 @@ type
     strike*: bool
     overline*: bool
 
+  Cell* = object of RootObj
+    formatting*: Formatting
+
   FlexibleCell* = object of Cell
     rune*: Rune
 
@@ -43,3 +46,6 @@ func newFixedGrid*(w: int, h: int = 1): FixedGrid =
 func width*(line: FlexibleLine): int =
   for c in line:
     result += c.rune.width()
+
+func newFormatting*(): Formatting =
+  return Formatting(fgcolor: defaultColor, bgcolor: defaultColor)