summaryrefslogtreecommitdiff
path: root/lisp/outline.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/outline.el')
-rw-r--r--lisp/outline.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/outline.el b/lisp/outline.el
index 0cd6eaa7186..0ec527060a1 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -894,7 +894,8 @@ Show the heading too, if it is currently invisible."
(or first (> (funcall outline-level) level)))
(setq first nil)
(outline-next-heading))
- (if (bolp)
+ (if (and (bolp) (not (eolp)))
+ ;; We stopped at a nonempty line (the next heading).
(progn
;; Go to end of line before heading
(forward-char -1)