Explorar el Código

Set default theme if not set

Zed hace 6 años
padre
commit
08845922f4
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      src/prefs.nim

+ 2 - 0
src/prefs.nim

@@ -49,6 +49,8 @@ proc getPrefs*(id: string; cfg: Config): Prefs =
   withDb:
     try:
       result.getOne("id = ?", id)
+      if result.theme.len == 0:
+        result.theme = cfg.defaultTheme
     except KeyError:
       result = getDefaultPrefs(cfg)