config: Refactor parsed option handling

Validate the parsed options directly after read and inform about errors.
This commit is contained in:
Jöran Karl
2024-07-23 22:33:16 +02:00
parent 395d848980
commit 4663927098
4 changed files with 90 additions and 39 deletions

View File

@@ -273,6 +273,10 @@ func main() {
screen.TermMessage(err)
continue
}
if err = config.OptionIsValid(k, nativeValue); err != nil {
screen.TermMessage(err)
continue
}
config.GlobalSettings[k] = nativeValue
config.VolatileSettings[k] = true
}