+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.
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