branch: elpa/magit
commit 35ee3a759e3da518be59d1719892c82cf12e0aad
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    magit-set-window-margins: Fix recent regression
    
    In [1: a47b5098c8] we started to fall back to preserving the current
    width for the right margin, similar to how we do for the left column.
    That makes sense for the left column, where we want to continue to
    support something else making use of that.  However in the case the
    right margin Magit claims absolute ownership in Magit buffers.  The
    result of this was that we lost the ability to hide the right margin
    again.
    
    1: 2025-08-26 a47b5098c812b7a7932df802378cb754e3ad8639
       Support displaying visibility indicator in left margin
---
 lisp/magit-margin.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lisp/magit-margin.el b/lisp/magit-margin.el
index 6803c6f05eb..4e6d488149b 100644
--- a/lisp/magit-margin.el
+++ b/lisp/magit-margin.el
@@ -163,9 +163,8 @@ does not carry to other options."
         (set-window-margins
          nil
          (if (characterp (car magit-section-visibility-indicator)) 1 left)
-         (if (magit--right-margin-active)
-             (nth 2 magit--right-margin-config)
-           right))))))
+         (and (magit--right-margin-active)
+              (nth 2 magit--right-margin-config)))))))
 
 (cl-defun magit-make-margin-overlay (&optional string (previous-line nil 
sline))
   "Display STRING in the margin of the previous (or current) line.

Reply via email to