summaryrefslogtreecommitdiff
path: root/lisp/outline.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2007-09-08 03:09:31 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2007-09-08 03:09:31 +0000
commitb7e5bc1c44850833ad2c0e0b2b72cf789c372b24 (patch)
tree2ec7a7e6a00a6a56f7366b199a0d4b5b58a0c397 /lisp/outline.el
parent2420deb36be267e3d98182e824902ec4cdb04e93 (diff)
(outline-flag-region): Use front-advance.
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 6eabd8f3d02..92e521afc9f 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -712,7 +712,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