Only show the first line of a section when hiding it, not the whole header.

This commit is contained in:
Marius Vollmer 2008-08-30 22:32:30 +03:00
parent 45055cdf3e
commit 1658e50c0d

View file

@ -399,7 +399,10 @@ Many Magit faces inherit from this one by default."
(defun magit-section-hideshow ()
(interactive)
(let ((beg (magit-section-first-child-position (point)))
(let ((beg (save-excursion
(goto-char (magit-section-beginning-position (point)))
(forward-line)
(point)))
(end (magit-section-ending-position (point))))
(if beg
(let ((inhibit-read-only t))