Looking for X terminal with correct window resize handling

terminal-emulatorx11

Is there any X terminal program, which reflows the content when I'm resizing the window? Gnome-terminal and Sakura does it well halfway: when I'm shrinking the window and re-expanding it, the stuff comes back to the right side of the screen as I want:

Opening a big window:

line 1 abcdefghijklmnopqrstuvwxyz       | right margin
line 2 abcdefghijklmnopqrstuvwxyz       | 

Shrinking it:

line 1 abcdefghijklm | right margin
line 2 abcdefghijklm |

Resizing to original (gnome-terminal, sakura), that's what I want to see:

line 1 abcdefghijklmnopqrstuvwxyz       | right margin
line 2 abcdefghijklmnopqrstuvwxyz       |

Resize to original (xterm, lxterm, PuTTY/win32), I don't like this:

line 1 abcdefghijklm                    | right margin
line 2 abcdefghijklm                    | 

That's okay, some terminals works well, others not. But when I'm opening a small window and expand it, all terminals works the same way: the lines remain wrapped at the left side, instead of re-flowing and re-wrapping:

Small window (line 1 and 2 just ran out of window):

line 3 abcdefghijklm | right margin
nopqrstuvwxyz        |
line 4 abcdefghijklm |
nopqrstuvwxyz        |

Resize to larger:

line 3 abcdefghijklm                    | right margin
nopqrstuvwxyz                           |
line 4 abcdefghijklm                    |
nopqrstuvwxyz                           |

What I want to see instead:

line 1 abcdefghijklmnopqrstuvwxyz       | right margin
line 2 abcdefghijklmnopqrstuvwxyz       |
line 3 abcdefghijklmnopqrstuvwxyz       |
line 4 abcdefghijklmnopqrstuvwxyz       |

Is there a chance to get this result? (I'm using Ubuntu with LXDE, if it matters).

Best Answer

Screen does what you want. It wraps lines while resizing the window.

sudo apt-get install screen
screen

HTH

Related Question