aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-11-27 19:28:58 +0000
committerRichard M. Stallman2005-11-27 19:28:58 +0000
commit91d99be6a8fb41c20884408ca0ee3ce50574a578 (patch)
treea06ccf00ab5ec8cdf2f455ef04365b0c8d920503
parent7279aaf668ba72fd32bd2c6f382d99046d14a32f (diff)
downloademacs-91d99be6a8fb41c20884408ca0ee3ce50574a578.tar.gz
emacs-91d99be6a8fb41c20884408ca0ee3ce50574a578.zip
(mouse-drag-move-window-bottom): Use adjust-window-trailing-edge.
-rw-r--r--lisp/mouse.el13
1 files changed, 3 insertions, 10 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 0aab1a99bb6..2c5d9cbddd6 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -371,16 +371,9 @@ That means one whose bottom edge is at the same height as WINDOW's top edge."
371Move it down if GROWTH is positive, or up if GROWTH is negative. 371Move it down if GROWTH is positive, or up if GROWTH is negative.
372If this would make WINDOW too short, 372If this would make WINDOW too short,
373shrink the window or windows above it to make room." 373shrink the window or windows above it to make room."
374 (let ((excess (- window-min-height (+ (window-height window) growth)))) 374 (condition-case nil
375 ;; EXCESS is the number of lines we need to take from windows above. 375 (adjust-window-trailing-edge window growth nil)
376 (if (> excess 0) 376 (error nil)))
377 ;; This can recursively shrink windows all the way up.
378 (let ((window-above (mouse-drag-window-above window)))
379 (if window-above
380 (mouse-drag-move-window-bottom window-above (- excess))))))
381 (save-selected-window
382 (select-window window)
383 (enlarge-window growth nil (> growth 0))))
384 377
385(defsubst mouse-drag-move-window-top (window growth) 378(defsubst mouse-drag-move-window-top (window growth)
386 "Move the top of WINDOW up or down by GROWTH lines. 379 "Move the top of WINDOW up or down by GROWTH lines.