Deal with empty diffs.
* magit.el (magit-create-buffer-sections): Create top section if body hasn't created any.
This commit is contained in:
parent
993354b867
commit
c9164c5d0b
1 changed files with 3 additions and 0 deletions
3
magit.el
3
magit.el
|
@ -347,6 +347,9 @@ Many Magit faces inherit from this one by default."
|
|||
(let ((magit-old-top-section magit-top-section))
|
||||
(setq magit-top-section nil)
|
||||
,@body
|
||||
(when (null magit-top-section)
|
||||
(magit-with-section 'top nil
|
||||
(insert "(empty)\n")))
|
||||
(magit-propertize-section magit-top-section)
|
||||
(magit-section-set-hidden magit-top-section
|
||||
(magit-section-hidden magit-top-section)))))
|
||||
|
|
Loading…
Reference in a new issue