aboutsummaryrefslogtreecommitdiff
path: root/evil-commands.el
diff options
context:
space:
mode:
authorTom Dalziel <tom_dl@hotmail.com>2021-07-23 15:33:32 +0100
committerTom Dalziel <tom_dl@hotmail.com>2021-07-23 15:33:32 +0100
commit32058519bedc482ad62870a15b68a4be00b75e47 (patch)
treec6a01b3be5775410e1670d7052131466c6e40f54 /evil-commands.el
parent5201f5cf5a4870e081d09bc3113a55cb94f3812f (diff)
Revert "Scroll half of the visible screen respecting zoom level (#1490)"
This reverts commit 070abb16620653fb343980fb85a13c4d55e1070b. As noted in #1497 this introduced bugs which imo are worse than the bug this commit aims to solve. More work needed.
Diffstat (limited to 'evil-commands.el')
-rw-r--r--evil-commands.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/evil-commands.el b/evil-commands.el
index 7bd93bc..ac88186 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -1043,7 +1043,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 (/ (evil-window-visible-height) 2)))
+ (setq count (/ (window-body-height) 2)))
(let ((xy (evil-posn-x-y (posn-at-point))))
(condition-case nil
(progn
@@ -1067,7 +1067,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 (/ (evil-window-visible-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))