emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 3440bd0: Fix scrolling in hexl-mode when ruler-mode is on


From: Lars Ingebrigtsen
Subject: master 3440bd0: Fix scrolling in hexl-mode when ruler-mode is on
Date: Tue, 8 Dec 2020 11:48:50 -0500 (EST)

branch: master
commit 3440bd0d53233f6345bfa4260444c01e352834ad
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 lisp/hexl.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/hexl.el b/lisp/hexl.el
index 5d813c4..fa514a5 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]