- (unless (or visible
- ;; Use the UPDATE argument of window-end
- ;; instead of calling follow-pos-visible
- ;; (which may be inaccurate for partially
- ;; visible lines).
- (and (>= dest (window-start))
- (< dest (window-end nil t))))
- ;; If point is not visible in the selected window,
- ;; perform a redisplay; this causes scrolling.
- (sit-for 0)
+ (unless visible
+ ;; If point may not be visible in the selected window,
+ ;; perform a redisplay; this ensures scrolling.
+ (redisplay)