]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Preserve truncated parts of terminal lines after a resize.
authorSimon Tatham <anakin@pobox.com>
Wed, 23 Jul 2014 21:48:02 +0000 (21:48 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 23 Jul 2014 21:48:02 +0000 (21:48 +0000)
commit271de3e4ec5682e5c2822824769ea91692e6fa0e
tree0c1cc754a97b59b8c10f5faf4646dba8fd48af7d
parentbc8de8a331a035deb8623911ba01c6ec800c1dc5
Preserve truncated parts of terminal lines after a resize.

We now only truncate a termline to the current terminal width if we're
actually going to modify it. As a result, resizing to a narrower
terminal width and then immediately back again, with no terminal
output in between, should restore the previous screen contents. Only
lines that are actually modified while the terminal is narrow (and
scrolling them around doesn't count as modification) should now be
truncated.

This will be a bit nicer for Unix window resizing (since X lacks the
Windows distinction between mid-drag resize events and the ultimate
drag-release, so can't defer the call to term_size until the latter as
we can on Windows), but mostly it's inspired by having played with a
tiling window manager recently and hence realised that in some
environments windows will be resized back and forth without much
control as a side effect of just moving them around - so it's
generally desirable for resizes to be non-destructive.

[originally from svn r10208]
terminal.c