Skip to content

Commit

Permalink
Fixes #1217, SPC T n after SPC T h broken
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nixmaniack authored and TheBB committed Oct 29, 2015
1 parent c3299f0 commit 8379c2f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/core-themes-support.el
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,11 @@ package name does not match theme name + `-theme' suffix.")
(interactive)
(when spacemacs--cur-theme
(disable-theme spacemacs--cur-theme)
(setq spacemacs--cycle-themes
(append spacemacs--cycle-themes (list spacemacs--cur-theme))))
;; if current theme isn't in cycleable themes, start over
(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))
(message "Loading theme %s..." spacemacs--cur-theme)
(spacemacs/load-theme spacemacs--cur-theme))
Expand Down

0 comments on commit 8379c2f

Please sign in to comment.