On Sat, Jun 22, 2019 at 12:44 AM Grant Taylor <gtay...@gentoo.tnetconsulting.net> wrote: >
> > This was expected. After all, the output of "cat foo" is not processed > > through readline. > > I don't think that readline has anything to do with this. I think (wrongly?) that readline deals with redrawing when typing a command in the shell. > > > > (But then, how can rxvt behave differently?) > > I don't know about rxvt per say. > > But I thought there was a common library (libterm?) used by a number of > terminal emulators that actually saved the output to a temporary file. > That way they could re-display the output if (when) the window size changed. > > After emerging and testing rxvt, yes, it will rewrap the line to the new > window width. It seems as if it saves the output as discreet lines and > re-wraps them individually based on the terminal width. So, the output > of an ls -l in a 132 character window, causes each line to be re-wrapped > (as below) when reducing the window width. > There is a dev-libs/libtermkey, which I don't have installed. However, my urxvt behaves as you describe, more or less: - open urxvt - cat some file with long enough lines - lines wrap - shrink window (horizontally) - contents are NOT redrawn (just like xterm) - restore window size - cat same file, etc - contents are now redrawn properly! It appears urxvt does the job by itself (minus what seems to be a bug) Jorge -