diff options
author | Koni Marti <koni.marti@gmail.com> | 2024-08-07 20:52:29 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-08-20 12:26:46 +0200 |
commit | 50647d589544abab35bcfb3d120bd2b6f907525e (patch) | |
tree | 77efbe0814e9ba2d6ee2e8ec55396894f1714b79 /config/ui.go | |
parent | 401bcee258713b911cd67aa6dc832e4eff25deb4 (diff) | |
download | aerc-50647d589544abab35bcfb3d120bd2b6f907525e.tar.gz |
config: add reload helper functions
Add reload helper function to reload config files. Store the initially
used config files for the reloading.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'config/ui.go')
-rw-r--r-- | config/ui.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/config/ui.go b/config/ui.go index 9839db9b..578ad294 100644 --- a/config/ui.go +++ b/config/ui.go @@ -134,9 +134,13 @@ type uiContextKey struct { value string } -var Ui = &UIConfig{ - contextualCounts: make(map[uiContextType]int), - contextualCache: make(map[uiContextKey]*UIConfig), +var Ui = defaultUIConfig() + +func defaultUIConfig() *UIConfig { + return &UIConfig{ + contextualCounts: make(map[uiContextType]int), + contextualCache: make(map[uiContextKey]*UIConfig), + } } var uiContextualSectionRe = regexp.MustCompile(`^ui:(account|folder|subject)([~=])(.+)$`) |