From 739e92a711753bf71dc29ff7fa15032149721137 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 8 Oct 2000 06:16:42 +0000 Subject: [PATCH] (mouse-drag-mode-line-1): Fix an off-by-one error in computing growth when dragging the header line. --- lisp/ChangeLog | 5 +++++ lisp/mouse.el | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 96e0a51dfd7..14b3d557a90 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-10-08 Eli Zaretskii + + * mouse.el (mouse-drag-mode-line-1): Fix an off-by-one error in + computing growth when dragging the header line. + 2000-10-08 Eli Zaretskii * simple.el (kill-line): Doc fix. diff --git a/lisp/mouse.el b/lisp/mouse.el index f4f35d90673..4f6ba257323 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -380,10 +380,11 @@ MODE-LINE-P non-nil means a mode line is dragged." (when (< (- y top -1) window-min-height) (setq y (+ top window-min-height -1))) (setq growth (- y bot -1))) - (t - (when (< (- bot y -1) window-min-height) - (setq y (- bot window-min-height -1))) - (setq growth (- top y -1)))) + (t ; header line + (when (< (- bot y) window-min-height) + (setq y (- bot window-min-height))) + ;; The window's top includes the header line! + (setq growth (- top y)))) (setq wconfig (current-window-configuration)) ;; Check for an error case. -- 2.39.5