display: upon resize, redraw the subwindows only when fully initialized

Otherwise 'currmenu' still has an invalid value, causing a division by
zero in bottombars() because shown_entries_for() returns zero.

This fixes the first part of https://savannah.gnu.org/bugs/?67635.
The issue was reported by `twofiftysix`.

Bug existed since version 8.6, commit 09d574ba.
This commit is contained in:
Benno Schulenberg 2025-10-27 15:31:06 +01:00
parent a23ad70e0e
commit c11569fb99

View File

@ -1073,8 +1073,8 @@ void regenerate_screen(void)
terminal_init();
window_init();
/* If we have an open buffer, redraw the contents of the subwindows. */
if (openfile) {
/* Only when fully initialized, redraw the contents of the subwindows. */
if (we_are_running) {
ensure_firstcolumn_is_aligned();
draw_all_subwindows();
}