Fix a cursor positioning infelicity.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 7 Mar 2008 18:30:37 +0000 (18:30 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 7 Mar 2008 18:30:37 +0000 (18:30 +0000)
commit83a421a5ec7770524c57f45bef3dcacb9dd9bfff
tree3ec5fb3a15eee3d1177a73ecae199f9e86ea8e78
parent24abf4f161576c23cea45b0a6ff790f2e59ad754
Fix a cursor positioning infelicity.

The scenario: I start a small, say 80x24, pterm. I do some work in
it, generating plenty of scrollback, and eventually I `less' a file.
`less' switches to the alt screen. Then I want more vertical space
to look at the file, so I enlarge the window to more like 80x60.
When I quit `less' and switch back to the primary screen, some
scrollback has been pulled down into the screen, as expected - but
the saved _cursor position_ is still at line 24, not at the bottom
of the new terminal where the prompt it goes with has moved to.

Solution: term_size() should adjust the alt-screen saved cursor
positions as well as the normal cursor position.

(Curiously, the problem doesn't happen on my home Debian box, even
without this fix. It happens on my RH9 box at work, though.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@7911 cda61777-01e9-0310-a592-d414129be87e
terminal.c