In Fresize_mini_window_internal set w->total_lines from w->pixel_height (Bug#18422).