diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c index 2ae981aa07b..f11fed9a2df 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2386,8 +2386,13 @@ by `current-window-configuration' (which see).") | |||
| 2386 | if (NILP (XBUFFER (new_current_buffer)->name)) | 2386 | if (NILP (XBUFFER (new_current_buffer)->name)) |
| 2387 | new_current_buffer = Qnil; | 2387 | new_current_buffer = Qnil; |
| 2388 | 2388 | ||
| 2389 | /* Mark all windows now on frame as "deleted". | 2389 | /* Kludge Alert! |
| 2390 | Restoring the new configuration "undeletes" any that are in it. */ | 2390 | Mark all windows now on frame as "deleted". |
| 2391 | Restoring the new configuration "undeletes" any that are in it. | ||
| 2392 | |||
| 2393 | Save their current buffers in their height fields, since we may | ||
| 2394 | need it later, if the buffer saved in the configuration is now | ||
| 2395 | dead. */ | ||
| 2391 | delete_all_subwindows (XWINDOW (FRAME_ROOT_WINDOW (f))); | 2396 | delete_all_subwindows (XWINDOW (FRAME_ROOT_WINDOW (f))); |
| 2392 | 2397 | ||
| 2393 | for (k = 0; k < saved_windows->size; k++) | 2398 | for (k = 0; k < saved_windows->size; k++) |
| @@ -2423,6 +2428,11 @@ by `current-window-configuration' (which see).") | |||
| 2423 | } | 2428 | } |
| 2424 | } | 2429 | } |
| 2425 | } | 2430 | } |
| 2431 | |||
| 2432 | /* If we squirreled away the buffer in the window's height, | ||
| 2433 | restore it now. */ | ||
| 2434 | if (XTYPE (w->height) == Lisp_Buffer) | ||
| 2435 | w->buffer = w->height; | ||
| 2426 | w->left = p->left; | 2436 | w->left = p->left; |
| 2427 | w->top = p->top; | 2437 | w->top = p->top; |
| 2428 | w->width = p->width; | 2438 | w->width = p->width; |
| @@ -2506,7 +2516,7 @@ static void | |||
| 2506 | delete_all_subwindows (w) | 2516 | delete_all_subwindows (w) |
| 2507 | register struct window *w; | 2517 | register struct window *w; |
| 2508 | { | 2518 | { |
| 2509 | register int count = 1; | 2519 | w->height = w->buffer; /* See Fset_window_configuration for excuse. */ |
| 2510 | w->buffer = Qnil; | 2520 | w->buffer = Qnil; |
| 2511 | if (!NILP (w->next)) | 2521 | if (!NILP (w->next)) |
| 2512 | delete_all_subwindows (XWINDOW (w->next)); | 2522 | delete_all_subwindows (XWINDOW (w->next)); |