diff options
author | jao <jao@gnu.org> | 2021-12-15 21:55:18 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-12-15 21:55:18 +0000 |
commit | f923ad94c799175177f5a0f333824b201eaf5088 (patch) | |
tree | dc06245071e2b48d794b471a7d5781c67f3c13d8 /lib | |
parent | 92bc885ac9040d23f50d506a351b5576be6ccddf (diff) | |
download | elibs-f923ad94c799175177f5a0f333824b201eaf5088.tar.gz elibs-f923ad94c799175177f5a0f333824b201eaf5088.tar.bz2 |
jao-minibuffer: make room again for tray icons
Diffstat (limited to 'lib')
-rw-r--r-- | lib/eos/jao-minibuffer.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el index 100e809..36c5238 100644 --- a/lib/eos/jao-minibuffer.el +++ b/lib/eos/jao-minibuffer.el @@ -28,7 +28,7 @@ (defvar jao-minibuffer-msg-info '("")) (defvar jao-minibuffer-notification nil) (defvar jao-minibuffer-align-right-p t) -(defvar jao-minibuffer-right-margin (if window-system 0 1)) +(defvar jao-minibuffer-right-margin (if window-system "" " ")) (defvar jao-minibuffer-maximized-frames-p nil) (defvar jao-minibuffer-frame-width nil) (defvar jao-minibuffer-notification-timeout 5) @@ -41,11 +41,12 @@ (defun jao-minibuffer--text-with-padding (text) "Return TEXT with padding on the left. The padding pushes TEXT to the right edge of the mode-line." - (let* ((len (- (string-pixel-width text) jao-minibuffer-right-margin)) + (let* ((len (+ (string-pixel-width text) + (string-pixel-width jao-minibuffer-right-margin))) (padding (propertize "-" 'display `(space :align-to (- (+ right right-margin) (,len)))))) - (concat padding text))) + (concat padding text jao-minibuffer-right-margin))) (defun jao-minibuffer--trim (s w) (if (<= (string-width (or s "")) w) @@ -84,7 +85,7 @@ The padding pushes TEXT to the right edge of the mode-line." (jao-minibuffer--text-with-padding msg) (let* ((mw (jao-minibuffer--width)) (w (mod (or w (string-width (or (current-message) ""))) mw)) - (w (- mw w jao-minibuffer-right-margin))) + (w (- mw w (length jao-minibuffer-right-margin)))) (if (> w 0) (jao-minibuffer--trim msg w) "")))))) (defun jao-minibuffer--insert (msg) |