summaryrefslogtreecommitdiff
path: root/lisp/outline.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-09 08:52:57 +0000
committerMiles Bader <miles@gnu.org>2007-10-09 08:52:57 +0000
commit1af74d06e5bdafad9d629d2ed729c5d743cfaf0f (patch)
tree0360965ec0ad2736ffee01cce4f040c6b0a99133 /lisp/outline.el
parenteceb3266a1f66a0034954aa82efbb20a5be959f8 (diff)
parent4b70e299ef66906fd285198003c72a1439d1f252 (diff)
downloademacs-1af74d06e5bdafad9d629d2ed729c5d743cfaf0f.tar.gz
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-875
Diffstat (limited to 'lisp/outline.el')
-rw-r--r--lisp/outline.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/outline.el b/lisp/outline.el
index 013b0ae9505..a1ed3d44f7f 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -710,7 +710,10 @@ If nil, `show-entry' is called to reveal the invisible text.")
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