diff options
author | bptato <nincsnevem662@gmail.com> | 2022-11-21 20:18:42 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-11-21 20:18:42 +0100 |
commit | 95444650537805d414deec706ad98e37df8b88db (patch) | |
tree | 9e7db0636bad99e934c76d7ce542c01d9dd2354c /src/config | |
parent | 652251c2f7a4ea8d8854e4987689005a3bfd318e (diff) | |
download | chawan-95444650537805d414deec706ad98e37df8b88db.tar.gz |
Add alt-screen option, fix an ansi color bug
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/config.nim | 6 |
1 files changed, 6 insertions, 0 deletions
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) |