I'm running into some strange behaviour related to terminal resize updates not being sent across ssh. On my local machine if I open a terminal and do tput lines
I get 24. Then making the window taller I repeat and get 49 (expected behaviour). Now I ssh to another machine and run tput lines
, I get 49, as expected. Then I make the window shorter and rerun tput lines
, I still get 49 (unexpected behaviour). This behaviour also happens if I connect without first resizing the terminal (lines is stuck at 24).
The reason I noticed this is that vim opens up with the wrong number of lines (generally too few because I ssh'd before making the window taller). I've tested this on a few remote computers and it acts the same with all of them. I'm using Xfce Terminal in Xfce on Gentoo x86-64.
How can I get the terminal to update its lines number?