Make sure that there is always a current section.

* magit.el (magit-current-section): Return magit-top-section when
there is no magit-section property.  This happens at eob.
This commit is contained in:
Marius Vollmer 2008-09-07 03:24:14 +03:00
parent 4623a798b3
commit d045293801

View file

@ -395,7 +395,8 @@ Many Magit faces inherit from this one by default."
prev))
(defun magit-current-section ()
(get-text-property (point) 'magit-section))
(or (get-text-property (point) 'magit-section)
magit-top-section))
(defun magit-insert-section (type title washer threshold cmd &rest args)
(let* ((body-beg nil)