diff options
| author | Richard M. Stallman | 2005-11-27 19:28:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-11-27 19:28:58 +0000 |
| commit | 91d99be6a8fb41c20884408ca0ee3ce50574a578 (patch) | |
| tree | a06ccf00ab5ec8cdf2f455ef04365b0c8d920503 | |
| parent | 7279aaf668ba72fd32bd2c6f382d99046d14a32f (diff) | |
| download | emacs-91d99be6a8fb41c20884408ca0ee3ce50574a578.tar.gz emacs-91d99be6a8fb41c20884408ca0ee3ce50574a578.zip | |
(mouse-drag-move-window-bottom): Use adjust-window-trailing-edge.
| -rw-r--r-- | lisp/mouse.el | 13 |
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." | |||
| 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. |