Subject: Re: bug#70485: 30.0.50; Asymetrical margins break mode-line-right-align-edge
From: Eli Zaretskii <[email-masked]>
To: Charles Gonnaud <[email-masked]>
Cc: [email-masked]
Date: Thu, 25 Apr 2024 19:36:47 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Sat, 20 Apr 2024 23:38:18 +0200
> From: Charles Gonnaud <[email-masked]>
> 
> Hello to all,
> Thank you for your work maintaining emacs, this is my first bug report
> so please be indulgent.
> 
> *** Bug description
> 
> I use a minor-mode similar to olivetti
> (https://github.com/rnkn/olivetti), which uses margins to center the
> text in the window.
> 
> Playing around with the doom modeline, which copied emacs 30's
> implementation of `mode-line-right-align-edge', I noticed that setting
> a different margin on the left and right resulted in a cropped modeline
> to the right.
> 
> *** Suggested patch
> 
> In mode--line-format-right-align() (lisp/bindings.el:384)
> - (* (or (cdr (window-margins)) 1)
> + (* (or (car (window-margins)) 0)

Thanks, you are right.  I've now installed your proposed change on the
master branch, and I'm therefore closing this bug.