From 4a089aa41dda1083bbacfb58f7a74ed1c7210213 Mon Sep 17 00:00:00 2001 From: Matthew Fidler Date: Thu, 28 Apr 2016 23:33:33 -0500 Subject: [PATCH] Update icons after executing a command. There should be no lag when activating a minor mode. --- mode-icons.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mode-icons.el b/mode-icons.el index 453e95a..2b177a4 100644 --- a/mode-icons.el +++ b/mode-icons.el @@ -1718,6 +1718,10 @@ When ENABLE is non-nil, enable the changes to the mode line." "Make `mode-icons' aware of icon." (mode-icons-set-minor-mode-icon)) +(defadvice command-execute (after mode-icons--reset-minor-mode-icons activate) + "Make `mode-icons' aware of any recenty activated minor modes." + (mode-icons-set-minor-mode-icon)) + (eval-after-load 'powerline '(progn (declare-function mode-icons--real-powerline-minor-modes "powerline")