From: Lars Ingebrigtsen Date: Tue, 8 Dec 2020 16:48:40 +0000 (+0100) Subject: Fix scrolling in hexl-mode when ruler-mode is on X-Git-Tag: emacs-28.0.90~4849 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3440bd0d53233f6345bfa4260444c01e352834ad;p=emacs.git Fix scrolling in hexl-mode when ruler-mode is on * lisp/hexl.el (hexl-scroll-down): (hexl-scroll-up): Take ruler-mode into account when computing the number of lines (bug#7031). These commands would previously jump one line too many by default, skipping one line. --- diff --git a/lisp/hexl.el b/lisp/hexl.el index 5d813c410c2..fa514a54002 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -722,7 +722,9 @@ With prefix arg N, puts point N bytes of the way from the true beginning." "Scroll hexl buffer window upward ARG lines; or near full window if no ARG." (interactive "P") (setq arg (if (null arg) - (1- (window-height)) + (- (window-height) + 1 + (if ruler-mode 1 0)) (prefix-numeric-value arg))) (hexl-scroll-up (- arg))) @@ -731,7 +733,9 @@ With prefix arg N, puts point N bytes of the way from the true beginning." If there's no byte at the target address, move to the first or last line." (interactive "P") (setq arg (if (null arg) - (1- (window-height)) + (- (window-height) + 1 + (if ruler-mode 1 0)) (prefix-numeric-value arg))) (let* ((movement (* arg 16)) (address (hexl-current-address))