diff options
| author | Bet4 <0xbet4@gmail.com> | 2019-05-19 09:43:41 +0800 |
|---|---|---|
| committer | Eivind Fonn <evfonn@gmail.com> | 2019-12-03 11:04:58 +0100 |
| commit | eaebf0dd01af7ce01ec5c494713ff8f188c18e7e (patch) | |
| tree | ec47f5c9ab995d4cb6c0991da39cdcb62132dd89 /evil-commands.el | |
| parent | df23fc18cfdc6b3792043784a888a63aa20d5df2 (diff) | |
Use window-body-height to get the number of visible lines
Diffstat (limited to 'evil-commands.el')
| -rw-r--r-- | evil-commands.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/evil-commands.el b/evil-commands.el index b816b1e..e638007 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -955,7 +955,7 @@ If the scroll count is zero the command scrolls half the screen." (when (= (point-min) (line-beginning-position)) (signal 'beginning-of-buffer nil)) (when (zerop count) - (setq count (/ (1- (window-height)) 2))) + (setq count (/ (window-body-height) 2))) (let ((xy (evil-posn-x-y (posn-at-point)))) (condition-case nil (progn @@ -979,7 +979,7 @@ If the scroll count is zero the command scrolls half the screen." (setq evil-scroll-count count) (when (eobp) (signal 'end-of-buffer nil)) (when (zerop count) - (setq count (/ (1- (window-height)) 2))) + (setq count (/ (window-body-height) 2))) ;; BUG #660: First check whether the eob is visible. ;; In that case we do not scroll but merely move point. (if (<= (point-max) (window-end)) |
