Implement DECRQPSR
On xterm one can use the escape sequence \033[1$w to determine amongst other things that the on the next input the terminal will scroll. I don't think this is possible with gnome terminal. (Note that \033[6n can't be used to determine this because it reports the same cursor position when the line is ascii character away from full as when it is full).