(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)
(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))