diff options
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/window.c b/src/window.c index be2f6330bf4..9f7dd58f0cc 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2118,7 +2118,7 @@ replace_buffer_in_all_windows (buffer) | |||
| 2118 | might crash Emacs. */ | 2118 | might crash Emacs. */ |
| 2119 | 2119 | ||
| 2120 | #define MIN_SAFE_WINDOW_WIDTH (2) | 2120 | #define MIN_SAFE_WINDOW_WIDTH (2) |
| 2121 | #define MIN_SAFE_WINDOW_HEIGHT (2) | 2121 | #define MIN_SAFE_WINDOW_HEIGHT (1) |
| 2122 | 2122 | ||
| 2123 | /* Make sure that window_min_height and window_min_width are | 2123 | /* Make sure that window_min_height and window_min_width are |
| 2124 | not too small; if they are, set them to safe minima. */ | 2124 | not too small; if they are, set them to safe minima. */ |
| @@ -3547,17 +3547,29 @@ enlarge_window (window, delta, widthflag, preserve_before) | |||
| 3547 | { | 3547 | { |
| 3548 | /* If trying to grow this window to or beyond size of the parent, | 3548 | /* If trying to grow this window to or beyond size of the parent, |
| 3549 | just delete all the sibling windows. */ | 3549 | just delete all the sibling windows. */ |
| 3550 | Lisp_Object tem, next; | 3550 | Lisp_Object start, tem, next; |
| 3551 | 3551 | ||
| 3552 | tem = XWINDOW (parent)->vchild; | 3552 | start = XWINDOW (parent)->vchild; |
| 3553 | if (NILP (tem)) | 3553 | if (NILP (start)) |
| 3554 | tem = XWINDOW (parent)->hchild; | 3554 | start = XWINDOW (parent)->hchild; |
| 3555 | 3555 | ||
| 3556 | /* Delete any siblings that come after WINDOW. */ | ||
| 3557 | tem = XWINDOW (window)->next; | ||
| 3556 | while (! NILP (tem)) | 3558 | while (! NILP (tem)) |
| 3557 | { | 3559 | { |
| 3558 | next = XWINDOW (tem)->next; | 3560 | next = XWINDOW (tem)->next; |
| 3559 | if (!EQ (tem, window)) | 3561 | delete_window (tem); |
| 3560 | delete_window (tem); | 3562 | tem = next; |
| 3563 | } | ||
| 3564 | |||
| 3565 | /* Delete any siblings that come after WINDOW. | ||
| 3566 | Note that if START is not WINDOW, then WINDOW still | ||
| 3567 | Fhas siblings, so WINDOW has not yet replaced its parent. */ | ||
| 3568 | tem = start; | ||
| 3569 | while (! EQ (tem, window)) | ||
| 3570 | { | ||
| 3571 | next = XWINDOW (tem)->next; | ||
| 3572 | delete_window (tem); | ||
| 3561 | tem = next; | 3573 | tem = next; |
| 3562 | } | 3574 | } |
| 3563 | } | 3575 | } |