The underlying problem here is that for console programs, the layout is determined by the client program, not the terminal. This implies that the terminal doesn't have the information to correctly re-layout the content on resize. The solution to this would be to pass structured data to the terminal and have it do the layout.