Commit b768542a authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit--insert-related-refs: Don't truncate

parent dae91251
......@@ -2164,16 +2164,13 @@ or a ref which is not a branch, then it inserts nothing."
(defun magit--insert-related-refs (rev arg title)
(when-let ((refs (magit-list-related-branches arg rev)))
(insert title ":" (make-string (- 10 (length title)) ?\s))
(let (branch)
(while (and (< (+ (- (point) (line-beginning-position))
(length (car refs)) 9)
(window-width))
(setq branch (pop refs)))
(insert ?\s)
(magit-insert-section (branch branch)
(insert (propertize branch 'face 'magit-branch-local)))))
(when refs
(insert (format " (%s more)" (length refs))))
(dolist (branch refs)
(if (<= (+ (current-column) 1 (length branch))
(window-width))
(insert ?\s)
(insert ?\n (make-string 12 ?\s)))
(magit-insert-section (branch branch)
(insert (propertize branch 'face 'magit-branch-local))))
(insert ?\n)))
(defun magit-insert-revision-gravatars (rev beg)
......
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