summaryrefslogtreecommitdiffhomepage
path: root/lib/eos
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-05-18 02:29:48 +0100
committerjao <jao@gnu.org>2021-05-18 02:29:48 +0100
commit20c8c2d117de3cd8ef264f8ca0ceefc38a8f3d21 (patch)
tree8325ac54a25909da53b564df42537c11a8c56c77 /lib/eos
parentf014851d98970f07d1515805060dd55678284f27 (diff)
downloadelibs-20c8c2d117de3cd8ef264f8ca0ceefc38a8f3d21.tar.gz
elibs-20c8c2d117de3cd8ef264f8ca0ceefc38a8f3d21.tar.bz2
jao-minibuffer: more robust updating on window selection
Diffstat (limited to 'lib/eos')
-rw-r--r--lib/eos/jao-minibuffer.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el
index cb2fd25..0a9b391 100644
--- a/lib/eos/jao-minibuffer.el
+++ b/lib/eos/jao-minibuffer.el
@@ -102,7 +102,6 @@
(defconst jao-minibuffer--circe
'(circe-chat-target (:eval (format " [%d]" (length (circe-channel-nicks))))))
-(defvar repeat-in-progress nil)
(defvar w3m-current-title nil)
(defvar jao-minibuffer--mode-line-format
@@ -115,7 +114,7 @@
(t "%b")))
"%]"
(:propertize ,jao-minibuffer--circe face jao-themes-dimm)
- " %+ "
+ " %*%+ "
(:propertize mode-name face jao-themes-f00)
(:propertize ("" minor-mode-alist (vc-mode vc-mode)) face jao-themes-f11)
(:propertize (doc-view-doc-type
@@ -124,6 +123,8 @@
face jao-themes-f12)
global-mode-string))
+(defvar jao-minibuffer--original-modeline nil)
+
(defun jao-minibuffer--add-variable (list-name variable-name &optional order)
(let ((v `(:eval ,variable-name)))
(setq jao-minibuffer-info (remove v jao-minibuffer-info))
@@ -139,13 +140,14 @@
;;;###autoload
(defun jao-minibuffer-add-mode-line (order)
+ (setq jao-minibuffer--original-modeline mode-line-format)
(setq-default mode-line-format '(" "))
(set-face-attribute 'mode-line nil :box nil :height 1
:background jao-minibuffer-active-buffer-line-color)
(set-face-attribute 'mode-line-inactive nil :box nil :height 1
:background jao-minibuffer-inactive-buffer-line-color)
(advice-add 'force-mode-line-update :after #'jao-minibuffer-refresh)
- (add-hook 'buffer-list-update-hook #'jao-minibuffer-refresh)
+ (advice-add 'select-window :after #'jao-minibuffer-refresh)
(jao-minibuffer-add-variable 'jao-minibuffer--mode-line-format order))
;;;###autoload