Use main_screen->co instead of current_term->TI_cols as fallback width for never-visible windows
Window management should be getting its idea of screen geometry from screens, rather than directly from the terminal.
This commit is contained in:
@@ -419,11 +419,16 @@ void BX_add_to_invisible_list(Window *window)
|
||||
invisible_list->prev = window;
|
||||
invisible_list = window;
|
||||
window->prev = NULL;
|
||||
|
||||
window->visible = 0;
|
||||
|
||||
/* Save the width of the screen the window was last on, to use for
|
||||
* wrapping output while the window is hidden.
|
||||
*/
|
||||
if (window->screen)
|
||||
window->columns = window->screen->co;
|
||||
else
|
||||
window->columns = current_term->TI_cols;
|
||||
window->columns = main_screen->co;
|
||||
window->screen = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user