aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-margin.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2025-08-28 13:34:31 +0200
committerJonas Bernoulli <jonas@bernoul.li>2025-08-28 13:34:31 +0200
commit7de46ddeb30e095645d93d73bbbc5fe3e8565ac5 (patch)
treee90b20dbdbdf93741ac018527feb557fc20901a3 /lisp/magit-margin.el
parent35ee3a759e3da518be59d1719892c82cf12e0aad (diff)
magit-set-window-margins: Fix recent regression fix
Diffstat (limited to 'lisp/magit-margin.el')
-rw-r--r--lisp/magit-margin.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/magit-margin.el b/lisp/magit-margin.el
index 4e6d488..e8e749d 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.