branch: elpa/git-commit
commit 97a95f70079b6613bf98d2306279d3e03fe51234
Author: Phil Sainty <[email protected]>
Commit: Phil Sainty <[email protected]>
magit-revision-fill-summary-line: Use revision buffer's window width
The selected window may have a different width to any window for the
revision buffer (E.g. it may be displaying a log buffer with margins,
and remain selected when using `magit-diff-show-or-scroll-up').
---
lisp/magit-diff.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index 1f0b8844b2..c3e13446e4 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -2598,7 +2598,7 @@ or a ref which is not a branch, then it inserts nothing."
(delete-region (match-beginning 0) (1+ (match-beginning 0)))))
(when magit-revision-fill-summary-line
(let ((fill-column (min magit-revision-fill-summary-line
- (window-width))))
+ (window-width (get-buffer-window nil t)))))
(fill-region (point) (line-end-position))))
(when magit-revision-use-hash-sections
(save-excursion