Commit 39f22c97 authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-log-margin-width: Hard-code shortstat width here

... instead of in `magit-set-window-margin'.
parent 93aa01c4
......@@ -1358,17 +1358,19 @@ The shortstat style is experimental and rather slow."
"")))
(defun magit-log-margin-width (style details details-width)
(+ (if details (1+ details-width) 0)
(if (stringp style)
(length (format-time-string style))
(+ 2 ; two digits
1 ; trailing space
(if (eq style 'age-abbreviated)
1 ; single character
(+ 1 ; gap after digits
(apply #'max (--map (max (length (nth 1 it))
(length (nth 2 it)))
magit--age-spec))))))))
(if magit-log-margin-show-shortstat
16
(+ (if details (1+ details-width) 0)
(if (stringp style)
(length (format-time-string style))
(+ 2 ; two digits
1 ; trailing space
(if (eq style 'age-abbreviated)
1 ; single character
(+ 1 ; gap after digits
(apply #'max (--map (max (length (nth 1 it))
(length (nth 2 it)))
magit--age-spec)))))))))
;;; Select Mode
......
......@@ -146,9 +146,7 @@ does not carry to other options."
(set-window-margins
nil (car (window-margins))
(and (magit-buffer-margin-p)
(if (bound-and-true-p magit-log-margin-show-shortstat)
16 ; kludge
(nth 2 magit-buffer-margin)))))))
(nth 2 magit-buffer-margin))))))
(defun magit-make-margin-overlay (&optional string previous-line)
(if previous-line
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment