When gdb receives SIGWINCH it always sets height to the current terminal geometry, even if height is currently set to 0 (unlimited).
Maybe "set pagination off" is better, but I think we can still preserve this.
https://sourceware.org/pipermail/gdb-patches/2020-September/172031.html
Perhaps init_page_info should use pagination_enabled instead of lines_per_page.