]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix 'mode-line-right-align-edge' with asymmetrical margins
authorEli Zaretskii <eliz@gnu.org>
Thu, 25 Apr 2024 16:34:42 +0000 (19:34 +0300)
committerEshel Yaron <me@eshelyaron.com>
Thu, 25 Apr 2024 16:47:11 +0000 (18:47 +0200)
* lisp/bindings.el (mode--line-format-right-align): Fix alignment
when window-margins are different on each side of the window.
Suggested by Charles Gonnaud <charles.gonnaud@gmail.com>.
(Bug#70485)

(cherry picked from commit 98649236f5eb1d89a60ebb9cc06c71f410f6b347)

lisp/bindings.el

index 4c4b89c4028cf9b6819bebfb0afb373460bbb050..59fcbf3fd0a38579a16a003d8f21734280e1166b 100644 (file)
@@ -381,7 +381,7 @@ the symbol `mode-line-format-right-align' is processed by
                  `(space :align-to (,(- (window-pixel-width)
                                          (window-scroll-bar-width)
                                          (window-right-divider-width)
-                                         (* (or (cdr (window-margins)) 1)
+                                         (* (or (car (window-margins)) 0)
                                             (frame-char-width))
                                          ;; Manually account for value of
                                          ;; `mode-line-right-align-edge' even