diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/simple.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 74821ae3116..cc358ae0edc 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2543,7 +2543,8 @@ Outline mode sets this." (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec))))) (if (get-text-property (point) 'invisible) - (goto-char (next-single-property-change (point) 'invisible)) + (goto-char (or (next-single-property-change (point) 'invisible) + (point-max))) (goto-char (next-overlay-change (point))))) (setq arg (1- arg))) (while (< arg 0) @@ -2558,7 +2559,8 @@ Outline mode sets this." (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec))))) (if (get-text-property (1- (point)) 'invisible) - (goto-char (previous-single-property-change (point) 'invisible)) + (goto-char (or (previous-single-property-change (point) 'invisible) + (point-min))) (goto-char (previous-overlay-change (point))))) (setq arg (1+ arg)))) (let ((buffer-invisibility-spec nil)) |