[2382] in Athena Bugs
Bug in XTERM, X11r3, VSII platform running 6.2A
daemon@ATHENA.MIT.EDU (Chris VanHaren (Athena User Consultant))
Tue Jun 13 15:13:30 1989
To: bugs@ATHENA.MIT.EDU
From: Chris VanHaren (Athena User Consultant) <vanharen@ATHENA.MIT.EDU>
Date: Tue, 13 Jun 89 15:13:05 EDT
SUMMARY: Xterm does not seem to be able to save the cursor position
correctly in a scrolling region in the xterm.
DETAILS: RS/1 sets a scrolling region at the bottom of the xterm, saves
the cursor position, prints text in the non-scrolling region, then
attempts to return to the scrolling region before printing it's prompt.
I've determined that this is not RS/1's fault, by capturing the output
from RS/1, and paring down the file to a few xterm escape codes and some
ascii text.
Apparently, the line number that is saved is actually the line
number from the top of the scrolling region. For example, if the
scrolling region starts at line 21, and you save the cursor at screen
position 22,18, say... then the cursor position saved appears to be
2,18. If you print something elsewhere on the screen, outside the
scrolling region, then attempt to restore the cursor position, it
returns to the wrong place.
TO DUPLICATE: Clear the xterm window, then "cat" the attached file in an
xterm window. This file was verified to produce the 'correct' results
on a vt220 terminal in vt100 emulation mode. It also produced the
correct results on a X11r2 xterm. A short explanation of the escape
codes is included. ESCape is represented with "\E" so that I can mail
this file. Control characters are represnted with a "^".
attach vanharen; clear; cat /mit/vanharen/xterm.test
This file will also leave your xterm with a scrolling region from line
21 to 24, so you will need to do a Soft Reset on the pull-down menu to
fix it.
Thanks,
Chris VanHaren
\E21;24r -- set scrolling region to line 21 through 24.
\E21;1H -- move to line 21, character 1.
\E7 -- save current cursor position.
\E8 -- restore cursor position.
FILE FOLLOWS ================================================================
\E[21;24r\E[21;1HThis text is on the first line of the scrolling resgion.^M
This is the second line.\E7 <-- cursor position was just saved after^M
the period pointed to on the line above. An "X" should be printed wherever^M
the cursor position is saved.\E[1;1HHome position.\E[6;1HSixth line.\E8X^M