From 9653c35fb9a4398942ecb305835a95fbd87c433a Mon Sep 17 00:00:00 2001 From: bptato Date: Sun, 28 Jul 2024 20:50:51 +0200 Subject: buffer, pager, config: add meta-refresh + misc fixes * buffer, pager, config: add meta-refresh value, which makes it possible to follow http-equiv=refresh META tags. * config: clean up redundant format mode parser * timeout: accept varargs for params to pass on to functions * pager: add "options" dict to JS gotoURL * twtstr: remove redundant startsWithNoCase --- src/types/cell.nim | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/types/cell.nim') diff --git a/src/types/cell.nim b/src/types/cell.nim index 8820f351..bc2f6924 100644 --- a/src/types/cell.nim +++ b/src/types/cell.nim @@ -2,19 +2,19 @@ import types/color import utils/strwidth type - FormatFlags* = enum - ffBold - ffItalic - ffUnderline - ffReverse - ffStrike - ffOverline - ffBlink + FormatFlag* = enum + ffBold = "bold" + ffItalic = "italic" + ffUnderline = "underline" + ffReverse = "reverse" + ffStrike = "strike" + ffOverline = "overline" + ffBlink = "blink" Format* = object fgcolor*: CellColor bgcolor*: CellColor - flags*: set[FormatFlags] + flags*: set[FormatFlag] SimpleFormatCell* = object format*: Format @@ -50,7 +50,7 @@ iterator items*(grid: FixedGrid): FixedCell {.inline.} = for cell in grid.cells: yield cell -const FormatCodes*: array[FormatFlags, tuple[s, e: uint8]] = [ +const FormatCodes*: array[FormatFlag, tuple[s, e: uint8]] = [ ffBold: (1u8, 22u8), ffItalic: (3u8, 23u8), ffUnderline: (4u8, 24u8), -- cgit 1.4.1-2-gfad0