From 1658e50c0d6ee83c5f849238498314b5a8769065 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Sat, 30 Aug 2008 22:32:30 +0300 Subject: [PATCH] Only show the first line of a section when hiding it, not the whole header. --- magit.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index d8da304f..8f540a6e 100644 --- a/magit.el +++ b/magit.el @@ -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))