diff options
author | bptato <nincsnevem662@gmail.com> | 2021-12-10 17:39:21 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2021-12-10 17:39:21 +0100 |
commit | e46f0a4cb9b6a843e900dbb3abd5ce9684f47016 (patch) | |
tree | 7d4c893343a1b26a9996ad999dbd89e091efa3a3 /src/io/cell.nim | |
parent | 91dee7d0d7cfe0f7faa2bf4b364e1db87ec6b70f (diff) | |
download | chawan-e46f0a4cb9b6a843e900dbb3abd5ce9684f47016.tar.gz |
Support more colors, config.nim refactoring
Diffstat (limited to 'src/io/cell.nim')
-rw-r--r-- | src/io/cell.nim | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/io/cell.nim b/src/io/cell.nim index 9587e5dd..0b991a0a 100644 --- a/src/io/cell.nim +++ b/src/io/cell.nim @@ -194,12 +194,12 @@ proc parseAnsiCode*(formatting: var Formatting, buf: string, fi: int): int = if ip[pi] == 2: inc pi if pi + 2 < ip.len: - let r = uint8(ip[pi]) + let r = ip[pi] inc pi - let g = uint8(ip[pi]) + let g = ip[pi] inc pi - let b = uint8(ip[pi]) - formatting.fgcolor = CellColor(rgb: true, rgbcolor: (r: r, g: g, b: b)) + let b = ip[pi] + formatting.fgcolor = CellColor(rgb: true, rgbcolor: rgb(r, g, b)) else: #TODO inc pi @@ -216,12 +216,12 @@ proc parseAnsiCode*(formatting: var Formatting, buf: string, fi: int): int = if ip[pi] == 2: inc pi if pi + 2 < ip.len: - let r = uint8(ip[pi]) + let r = ip[pi] inc pi - let g = uint8(ip[pi]) + let g = ip[pi] inc pi - let b = uint8(ip[pi]) - formatting.bgcolor = CellColor(rgb: true, rgbcolor: (r: r, g: g, b: b)) + let b = ip[pi] + formatting.bgcolor = CellColor(rgb: true, rgbcolor: rgb(r, g, b)) else: #TODO inc pi |