mirror of
https://github.com/ryuslash/mode-icons.git
synced 2024-11-22 01:50:28 +01:00
Fix the diminished modes so they display nothing
This commit is contained in:
parent
7f3f53b510
commit
f0f3103a49
1 changed files with 9 additions and 9 deletions
|
@ -200,19 +200,19 @@ ICON-SPEC should be a specification from `mode-icons'."
|
||||||
(when minor
|
(when minor
|
||||||
(or (assq (car mode) mode-icons-set-minor-mode-icon-alist)
|
(or (assq (car mode) mode-icons-set-minor-mode-icon-alist)
|
||||||
(push (copy-sequence minor) mode-icons-set-minor-mode-icon-alist))
|
(push (copy-sequence minor) mode-icons-set-minor-mode-icon-alist))
|
||||||
(setq mode-name (replace-regexp-in-string "^ " "" mode-name))
|
(setq mode-name (replace-regexp-in-string "^ " "" mode-name)
|
||||||
|
mode-name (mode-icons-propertize-mode mode-name icon-spec))
|
||||||
|
(if (string= "" mode-name)
|
||||||
|
(setcdr minor (list ""))
|
||||||
(setcdr minor (list (concat (or (and mode-icons-separate-images-with-spaces " ") "")
|
(setcdr minor (list (concat (or (and mode-icons-separate-images-with-spaces " ") "")
|
||||||
(mode-icons-propertize-mode mode-name icon-spec)))))))))
|
mode-name)))))))))
|
||||||
(force-mode-line-update))
|
(force-mode-line-update))
|
||||||
|
|
||||||
(defun mode-icons--generate-minor-mode-list ()
|
(defun mode-icons--generate-minor-mode-list ()
|
||||||
"Extracts all rich strings necessary for the minor mode list."
|
"Extracts all rich strings necessary for the minor mode list."
|
||||||
(delete "" (mapcar (lambda(mode)
|
(delete " " (delete "" (mapcar (lambda(mode)
|
||||||
(let ((pm (eval `(propertize ,mode ,@mode-icons-minor-mode-base-text-properties))))
|
(concat " " (eval `(propertize ,mode ,@mode-icons-minor-mode-base-text-properties))))
|
||||||
(unless (string= pm "")
|
(split-string (format-mode-line minor-mode-alist))))))
|
||||||
(setq pm (concat " " pm)))
|
|
||||||
pm))
|
|
||||||
(split-string (format-mode-line minor-mode-alist)))))
|
|
||||||
|
|
||||||
;; Based on rich-minority by Artur Malabarba
|
;; Based on rich-minority by Artur Malabarba
|
||||||
(defvar mode-icons--backup-construct nil)
|
(defvar mode-icons--backup-construct nil)
|
||||||
|
|
Loading…
Reference in a new issue