In linux, when a terminal (like xterm) gets resized to something smaller, then expanded again, its output history gets truncated to whatever the smaller width was. Does anybody know how to make the terminal remember its previous state, or wrap text so that this doesn't break?
For example, if your terminal reads something like (using | to indicate the window edge):
|user@machine$ cat file |
|file contents foobar blah blah |
|fooblah blah |
And the terminal is resized to, say 6 characters, it looks like this:
|user@m|
|file c|
|foobla|
Then putting the width back to what it was before gives:
|user@m |
|file c |
|foobla |
This can get pretty irritating when it means you lose useful console output. Does anybody have a solution?