Fixes #1217, SPC T n after SPC T h broken
If we select a theme after spacemacs' startup, then `spacemacs--cycle-themes` doesn't have the first theme from `dotspacemacs-themes` so we start over.
This commit is contained in:
parent
c3299f0eca
commit
8379c2f7af
|
@ -193,8 +193,11 @@ package name does not match theme name + `-theme' suffix.")
|
||||||
(interactive)
|
(interactive)
|
||||||
(when spacemacs--cur-theme
|
(when spacemacs--cur-theme
|
||||||
(disable-theme spacemacs--cur-theme)
|
(disable-theme spacemacs--cur-theme)
|
||||||
(setq spacemacs--cycle-themes
|
;; if current theme isn't in cycleable themes, start over
|
||||||
(append spacemacs--cycle-themes (list spacemacs--cur-theme))))
|
(if (not (member spacemacs--cur-theme dotspacemacs-themes))
|
||||||
|
(setq spacemacs--cycle-themes dotspacemacs-themes)
|
||||||
|
(setq spacemacs--cycle-themes
|
||||||
|
(append spacemacs--cycle-themes (list spacemacs--cur-theme)))))
|
||||||
(setq spacemacs--cur-theme (pop spacemacs--cycle-themes))
|
(setq spacemacs--cur-theme (pop spacemacs--cycle-themes))
|
||||||
(message "Loading theme %s..." spacemacs--cur-theme)
|
(message "Loading theme %s..." spacemacs--cur-theme)
|
||||||
(spacemacs/load-theme spacemacs--cur-theme))
|
(spacemacs/load-theme spacemacs--cur-theme))
|
||||||
|
|
Loading…
Reference in a new issue