(current-y (+ (cdr (posn-x-y posn))
(cdr (posn-object-width-height posn)))))
(while (< (- max-y current-y) delta)
- (when (zerop (vertical-motion -1))
- (set-window-vscroll nil 0)
- (signal 'beginning-of-buffer nil))
+ (vertical-motion -1)
(setq current-y (- current-y (line-pixel-height)))))
+ (let ((current-vscroll (window-vscroll nil t)))
+ (setq delta (- delta current-vscroll))
+ (set-window-vscroll nil 0 t))
(while (> delta 0)
(set-window-start nil (save-excursion
(goto-char (window-start))