diff options
| author | Richard M. Stallman | 1994-05-22 08:30:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-22 08:30:57 +0000 |
| commit | 6b54027bd8ed9f4d72d347391884341d63b3ce39 (patch) | |
| tree | 1c9915dc56ee5ff5a97bdbf87c620cfd675bfc03 /src | |
| parent | 555235e68725fef84e088a67a9e387ba48d46c72 (diff) | |
| download | emacs-6b54027bd8ed9f4d72d347391884341d63b3ce39.tar.gz emacs-6b54027bd8ed9f4d72d347391884341d63b3ce39.zip | |
(change_window_height): Test for DELTA too small
only after making it smaller based on maxdelta.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/window.c b/src/window.c index 8fa6472057a..3994f3b8088 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1252,10 +1252,10 @@ window_loop (type, obj, mini, frames) | |||
| 1252 | { | 1252 | { |
| 1253 | struct window *best_window_ptr = XWINDOW (best_window); | 1253 | struct window *best_window_ptr = XWINDOW (best_window); |
| 1254 | struct window *w_ptr = XWINDOW (w); | 1254 | struct window *w_ptr = XWINDOW (w); |
| 1255 | if (NILP (best_window) || | 1255 | if (NILP (best_window) |
| 1256 | (XFASTINT (w_ptr->height) * XFASTINT (w_ptr->width)) | 1256 | || (XFASTINT (w_ptr->height) * XFASTINT (w_ptr->width) |
| 1257 | > (XFASTINT (best_window_ptr->height) | 1257 | > (XFASTINT (best_window_ptr->height) |
| 1258 | * XFASTINT (best_window_ptr->width))) | 1258 | * XFASTINT (best_window_ptr->width)))) |
| 1259 | best_window = w; | 1259 | best_window = w; |
| 1260 | } | 1260 | } |
| 1261 | break; | 1261 | break; |
| @@ -2072,12 +2072,6 @@ change_window_height (delta, widthflag) | |||
| 2072 | 2072 | ||
| 2073 | sizep = &CURSIZE (window); | 2073 | sizep = &CURSIZE (window); |
| 2074 | 2074 | ||
| 2075 | if (*sizep + delta < MINSIZE (window)) | ||
| 2076 | { | ||
| 2077 | Fdelete_window (window); | ||
| 2078 | return; | ||
| 2079 | } | ||
| 2080 | |||
| 2081 | { | 2075 | { |
| 2082 | register int maxdelta; | 2076 | register int maxdelta; |
| 2083 | 2077 | ||
| @@ -2093,13 +2087,19 @@ change_window_height (delta, widthflag) | |||
| 2093 | the full frame, or make the only window aside from the | 2087 | the full frame, or make the only window aside from the |
| 2094 | minibuffer the full frame. */ | 2088 | minibuffer the full frame. */ |
| 2095 | delta = maxdelta; | 2089 | delta = maxdelta; |
| 2090 | } | ||
| 2096 | 2091 | ||
| 2097 | if (delta == 0) | 2092 | if (*sizep + delta < MINSIZE (window)) |
| 2093 | { | ||
| 2094 | Fdelete_window (window); | ||
| 2098 | return; | 2095 | return; |
| 2099 | } | 2096 | } |
| 2097 | |||
| 2098 | if (delta == 0) | ||
| 2099 | return; | ||
| 2100 | 2100 | ||
| 2101 | if (!NILP (p->next) && | 2101 | if (!NILP (p->next) |
| 2102 | (*sizefun) (p->next) - delta >= MINSIZE (p->next)) | 2102 | && (*sizefun) (p->next) - delta >= MINSIZE (p->next)) |
| 2103 | { | 2103 | { |
| 2104 | (*setsizefun) (p->next, (*sizefun) (p->next) - delta, 0); | 2104 | (*setsizefun) (p->next, (*sizefun) (p->next) - delta, 0); |
| 2105 | (*setsizefun) (window, *sizep + delta, 0); | 2105 | (*setsizefun) (window, *sizep + delta, 0); |
| @@ -2108,8 +2108,8 @@ change_window_height (delta, widthflag) | |||
| 2108 | but it propagates the new top edge to its children */ | 2108 | but it propagates the new top edge to its children */ |
| 2109 | (*setsizefun) (p->next, (*sizefun) (p->next), 0); | 2109 | (*setsizefun) (p->next, (*sizefun) (p->next), 0); |
| 2110 | } | 2110 | } |
| 2111 | else if (!NILP (p->prev) && | 2111 | else if (!NILP (p->prev) |
| 2112 | (*sizefun) (p->prev) - delta >= MINSIZE (p->prev)) | 2112 | && (*sizefun) (p->prev) - delta >= MINSIZE (p->prev)) |
| 2113 | { | 2113 | { |
| 2114 | (*setsizefun) (p->prev, (*sizefun) (p->prev) - delta, 0); | 2114 | (*setsizefun) (p->prev, (*sizefun) (p->prev) - delta, 0); |
| 2115 | CURBEG (window) -= delta; | 2115 | CURBEG (window) -= delta; |
| @@ -2713,8 +2713,8 @@ by `current-window-configuration' (which see).") | |||
| 2713 | /* As documented in Fcurrent_window_configuration, don't | 2713 | /* As documented in Fcurrent_window_configuration, don't |
| 2714 | save the location of point in the buffer which was current | 2714 | save the location of point in the buffer which was current |
| 2715 | when the window configuration was recorded. */ | 2715 | when the window configuration was recorded. */ |
| 2716 | if (!EQ (p->buffer, new_current_buffer) && | 2716 | if (!EQ (p->buffer, new_current_buffer) |
| 2717 | XBUFFER (p->buffer) == current_buffer) | 2717 | && XBUFFER (p->buffer) == current_buffer) |
| 2718 | Fgoto_char (w->pointm); | 2718 | Fgoto_char (w->pointm); |
| 2719 | } | 2719 | } |
| 2720 | else if (NILP (w->buffer) || NILP (XBUFFER (w->buffer)->name)) | 2720 | else if (NILP (w->buffer) || NILP (XBUFFER (w->buffer)->name)) |