branch: elpa/magit
commit 7de46ddeb30e095645d93d73bbbc5fe3e8565ac5
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-set-window-margins: Fix recent regression fix
---
lisp/magit-margin.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/lisp/magit-margin.el b/lisp/magit-margin.el
index 4e6d488149b..e8e749d4e1d 100644
--- a/lisp/magit-margin.el
+++ b/lisp/magit-margin.el
@@ -158,13 +158,14 @@ does not carry to other options."
(defun magit-set-window-margins (&optional window)
(when (or window (setq window (get-buffer-window)))
- (pcase-let ((`(,left . ,right) (window-margins)))
- (with-selected-window window
- (set-window-margins
- nil
- (if (characterp (car magit-section-visibility-indicator)) 1 left)
- (and (magit--right-margin-active)
- (nth 2 magit--right-margin-config)))))))
+ (with-selected-window window
+ (set-window-margins
+ nil
+ (if (characterp (car magit-section-visibility-indicator))
+ 1
+ (car (window-margins)))
+ (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.