Mercurial > emacs
comparison lisp/mouse.el @ 67158:2c91c2e7af3a
(mouse-drag-move-window-bottom): Use adjust-window-trailing-edge.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 27 Nov 2005 19:28:58 +0000 |
parents | 550c8e306cb5 |
children | 9014ad13a926 |
comparison
equal
deleted
inserted
replaced
67157:657155c4b77b | 67158:2c91c2e7af3a |
---|---|
369 (defun mouse-drag-move-window-bottom (window growth) | 369 (defun mouse-drag-move-window-bottom (window growth) |
370 "Move the bottom of WINDOW up or down by GROWTH lines. | 370 "Move the bottom of WINDOW up or down by GROWTH lines. |
371 Move it down if GROWTH is positive, or up if GROWTH is negative. | 371 Move it down if GROWTH is positive, or up if GROWTH is negative. |
372 If this would make WINDOW too short, | 372 If this would make WINDOW too short, |
373 shrink the window or windows above it to make room." | 373 shrink 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. |
387 Move it down if GROWTH is positive, or up if GROWTH is negative. | 380 Move it down if GROWTH is positive, or up if GROWTH is negative. |
388 If this would make WINDOW too short, shrink the window or windows | 381 If this would make WINDOW too short, shrink the window or windows |