changeset 78752:0475afda0917

(outline-flag-region): Use front-advance.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 08 Sep 2007 03:09:31 +0000
parents ddae332b1ca3
children cd3530596f8e
files lisp/ChangeLog lisp/outline.el
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Sep 07 15:54:15 2007 +0000
+++ b/lisp/ChangeLog	Sat Sep 08 03:09:31 2007 +0000
@@ -1,3 +1,7 @@
+2007-09-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* outline.el (outline-flag-region): Use front-advance.
+
 2007-09-07  Ilya Zakharevich  <ilyaz@cpan.org>
 
 	* progmodes/cperl-mode.el: Merge upstream 5.23.
--- a/lisp/outline.el	Fri Sep 07 15:54:15 2007 +0000
+++ b/lisp/outline.el	Sat Sep 08 03:09:31 2007 +0000
@@ -712,7 +712,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