diff options
| -rw-r--r-- | lisp/pixel-scroll.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 9cd2352e199..2d6531a2d17 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el | |||
| @@ -383,7 +383,7 @@ the height of the current window." | |||
| 383 | (desired-vscroll (cdr (posn-object-x-y desired-pos))) | 383 | (desired-vscroll (cdr (posn-object-x-y desired-pos))) |
| 384 | (next-pos (save-excursion | 384 | (next-pos (save-excursion |
| 385 | (goto-char desired-start) | 385 | (goto-char desired-start) |
| 386 | (when (zerop (vertical-motion 1)) | 386 | (when (zerop (vertical-motion (1+ scroll-margin))) |
| 387 | (signal 'end-of-buffer nil)) | 387 | (signal 'end-of-buffer nil)) |
| 388 | (point)))) | 388 | (point)))) |
| 389 | (if (and (< (point) next-pos) | 389 | (if (and (< (point) next-pos) |
| @@ -419,7 +419,7 @@ the height of the current window." | |||
| 419 | (point (posn-point posn)) | 419 | (point (posn-point posn)) |
| 420 | (up-point (save-excursion | 420 | (up-point (save-excursion |
| 421 | (goto-char point) | 421 | (goto-char point) |
| 422 | (vertical-motion -1) | 422 | (vertical-motion (- (1+ scroll-margin))) |
| 423 | (point)))) | 423 | (point)))) |
| 424 | (when (> (point) up-point) | 424 | (when (> (point) up-point) |
| 425 | (when (let ((pos-visible (pos-visible-in-window-p up-point nil t))) | 425 | (when (let ((pos-visible (pos-visible-in-window-p up-point nil t))) |