diff lisp/outline.el @ 85114:5039706521c9

Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-875
author Miles Bader <miles@gnu.org>
date Tue, 09 Oct 2007 08:52:57 +0000
parents 33b5c158a227 0475afda0917
children 107ccd98fa12 14c4a6aac623
line wrap: on
line diff
--- a/lisp/outline.el	Tue Oct 09 08:44:02 2007 +0000
+++ b/lisp/outline.el	Tue Oct 09 08:52:57 2007 +0000
@@ -710,7 +710,10 @@
 If FLAG is nil then text is shown, while if FLAG is t the text is hidden."
   (remove-overlays from to 'invisible 'outline)
   (when flag
-    (let ((o (make-overlay from to)))
+    ;; We use `front-advance' here because the invisible text begins at the
+    ;; very end of the heading, before the newline, so text inserted at FROM
+    ;; belongs to the heading rather than to the entry.
+    (let ((o (make-overlay from to nil 'front-advance)))
       (overlay-put o 'invisible 'outline)
       (overlay-put o 'isearch-open-invisible
 		   (or outline-isearch-open-invisible-function