summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/textmodes/outline.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/textmodes/outline.el b/lisp/textmodes/outline.el
index f12518c4051..f9717798b3d 100644
--- a/lisp/textmodes/outline.el
+++ b/lisp/textmodes/outline.el
@@ -620,7 +620,8 @@ With argument, move up ARG levels."
(> arg 0)
(not (bobp)))
(let ((present-level (funcall outline-level)))
- (while (not (< (funcall outline-level) present-level))
+ (while (and (not (< (funcall outline-level) present-level))
+ (not (bobp)))
(outline-previous-visible-heading 1))
(setq arg (- arg 1)))))