]> code.delx.au - gnu-emacs/commitdiff
(mouse-drag-mode-line-1): Fix an off-by-one error in
authorEli Zaretskii <eliz@gnu.org>
Sun, 8 Oct 2000 06:16:42 +0000 (06:16 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 8 Oct 2000 06:16:42 +0000 (06:16 +0000)
computing growth when dragging the header line.

lisp/ChangeLog
lisp/mouse.el

index 96e0a51dfd7268fc957363cef6f41a94aa8ec384..14b3d557a904244cfbe01f83bdbf87c910db13c8 100644 (file)
@@ -1,3 +1,8 @@
+2000-10-08  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * 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  <eliz@is.elta.co.il>
 
        * simple.el (kill-line): Doc fix.
index f4f35d90673e37a886483b5911cf4fe4fe65a318..4f6ba2573231a2023324ba054853ed4c83180ea1 100644 (file)
@@ -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.