spacemacs-buffer: fix bug to show random banner

The previous commit has a bug that after killing the startup buffer and re-open
it, the random text banner would not appear.

This commit fixes that.
This commit is contained in:
Lucius Hu 2022-02-15 14:01:03 -05:00
parent b7e1dee13f
commit 13dedf7250
No known key found for this signature in database
GPG Key ID: 7E474E82E29B5A7A
1 changed files with 2 additions and 1 deletions

View File

@ -241,7 +241,8 @@ If ALL is non-nil then truly all banners can be selected."
(count (length files))
;; -2 to remove the two last ones (easter eggs)
(choice (random (- count (if all 0 2)))))
(setq spacemacs-buffer--random-banner (nth choice files)))))
(setq spacemacs-buffer--random-banner (nth choice files))))
spacemacs-buffer--random-banner)
(defun spacemacs-buffer//get-banner-path (index)
"Return the full path to banner with index INDEX."