Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kiennq/emacs-mini-modeline
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d3b6e469de5d652c4881a9063f476bcc574e468a
Choose a base ref
..
head repository: kiennq/emacs-mini-modeline
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c51956ddc360d88d3530382a124184eda1f710c8
Choose a head ref
Showing with 9 additions and 9 deletions.
  1. +9 −9 mini-modeline.el
18 changes: 9 additions & 9 deletions mini-modeline.el
Original file line number Diff line number Diff line change
@@ -258,7 +258,8 @@ When ARG is:
;; this is to prevent window flashing for consecutive multi-line message
(mini-modeline--overduep mini-modeline--last-change-size
mini-modeline-echo-duration))
(window-resize (minibuffer-window mini-modeline-frame) height-delta)
(run-at-time 0.01 nil (lambda ()
(window-resize (minibuffer-window mini-modeline-frame) height-delta)))
(setq mini-modeline--last-change-size (current-time)))
(insert (car mini-modeline--cache))))))))))
((error debug)
@@ -273,7 +274,8 @@ When ARG is:
"Render the LEFT and RIGHT part of mini-modeline."
(let* ((left (or left ""))
(right (or right ""))
(available-width (max (- (frame-width mini-modeline-frame)
(frame-width (frame-width mini-modeline-frame))
(available-width (max (- frame-width
(string-width left)
mini-modeline-right-padding)
0))
@@ -286,9 +288,8 @@ When ARG is:
(format (format "%%s %%%d.%ds" available-width available-width) left right)
0)
(cons
(let ((available-width (+ available-width (string-width left))))
(format (format "%%0.%ds\n%%s" available-width) right left))
(ceiling (string-width left) (frame-width mini-modeline-frame))))
(format (format "%%%d.%ds\n%%s" (- frame-width 1) (- frame-width 1)) right left)
(ceiling (string-width left) frame-width)))
(cons (format (format "%%s %%%ds" available-width) left right) 0))))

(defun mini-modeline--multi-lr-render (left right)
@@ -344,7 +345,7 @@ BODY will be supplied with orig-func and args."
(when mini-modeline-enhance-visual
(with-current-buffer mini-modeline--minibuffer
(mini-modeline--set-buffer-face)))
(setq resize-mini-windows nil))
(setq resize-mini-windows mini-modeline--orig-resize-mini-windows))

(declare-function anzu--cons-mode-line "ext:anzu")
(declare-function anzu--reset-mode-line "ext:anzu")
@@ -392,11 +393,10 @@ BODY will be supplied with orig-func and args."
'mini-modeline-mode-line-inactive
(default-value 'face-remapping-alist) face-remaps))))

(setq mini-modeline--orig-resize-mini-windows resize-mini-windows)
(setq resize-mini-windows nil)
(setq resize-mini-windows mini-modeline--orig-resize-mini-windows)
(redisplay)
;; (add-hook 'pre-redisplay-functions #'mini-modeline-display)
(setq mini-modeline--timer (run-with-timer 0 0.1 #'mini-modeline-display))
(setq mini-modeline--timer (run-with-idle-timer 0.1 t #'mini-modeline-display))
(advice-add #'message :around #'mini-modeline--reroute-msg)

(add-hook 'minibuffer-setup-hook #'mini-modeline--enter-minibuffer)