ui/doom-modeline: support emacs macros in macro display segment

This commit is contained in:
Henrik Lissner 2017-03-03 17:49:30 -05:00
parent 68c172dd92
commit fcb88ef940

View file

@ -410,11 +410,13 @@ lines are selected, or the NxM dimensions of a block selection."
(defun +doom-modeline--macro-recording () (defun +doom-modeline--macro-recording ()
"Display current macro being recorded." "Display current Emacs or evil macro being recorded."
(when (and (active) (bound-and-true-p evil-this-macro)) (when (and (active) (or defining-kbd-macro executing-kbd-macro))
(let ((sep (propertize " " 'face 'doom-modeline-panel))) (let ((sep (propertize " " 'face 'doom-modeline-panel)))
(concat sep (concat sep
(propertize (char-to-string evil-this-macro) (propertize (if (bound-and-true-p evil-this-macro)
(char-to-string evil-this-macro)
"Macro")
'face 'doom-modeline-panel) 'face 'doom-modeline-panel)
sep sep
(all-the-icons-octicon "triangle-right" (all-the-icons-octicon "triangle-right"