Important bug in xterm: escape code for scroll_reverse is not handled properly
The escape code for scroll_reverse is not properly handled by
xterm but only when the scroll region starts at line one.
(Severity not important because I don't want xterm removed under
For a while there has been a problem with joe in an xterm where
the scrolling didn't work properly but since I was using slink
I figured it'd be be fixed in potato. Since I upgraded to
potato it hasn't been fixed so I've tracked it down.
It only happens when joe is showing multiple files on the
same screen. When you press enter it's supposed to insert a
line. joe sends the following sequence (extracted from strace
\33[m\17 default colour, normal charset
\33[19;28r set scroll region lines 19-28
\33[H move cursor home
\33[1;56r set scroll region lines 1-56
\33[1;93H\33[7m8 update row display
\33[19;10H restore cursor
If you only have one file open, lines 2 to 5 are replaced with
\33L (insert_line) so the problem does not occur.
It only happens if the scroll region does not start at line one.
If you change the first set scroll region to start at line 1, it
works. It doesn't matter where the region ends. (Tested with
echo -e '\e7\e[1;10r\eM\e[1;56r\e8' -- works fine
echo -e '\e7\e[2;10r\eM\e[1;56r\e8' -- has no effect
(type reset to get your terminal working again :)
Martijn van Oosterhout <email@example.com>
Trust the computer industry to shorten "Year 2000" to Y2K.
It was this kind of thinking that caused the problem in the first place.