From 95444650537805d414deec706ad98e37df8b88db Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 21 Nov 2022 20:18:42 +0100 Subject: Add alt-screen option, fix an ansi color bug --- src/config/config.nim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/config') diff --git a/src/config/config.nim b/src/config/config.nim index 04255b79..131571cb 100644 --- a/src/config/config.nim +++ b/src/config/config.nim @@ -24,6 +24,7 @@ type headless*: bool colormode*: Option[ColorMode] formatmode*: Option[FormatMode] + altscreen*: Option[bool] func getRealKey(key: string): string = var realk: string @@ -124,6 +125,11 @@ proc parseConfig(config: Config, dir: string, t: TomlValue) = of "display": for k, v in v: case k + of "alt-screen": + if v.vt == VALUE_BOOLEAN: + config.altscreen = some(v.b) + elif v.vt == VALUE_STRING and v.s == "auto": + config.altscreen = none(bool) of "color-mode": case v.s of "auto": config.colormode = none(ColorMode) -- cgit 1.4.1-2-gfad0