[comp.windows.x] Xterm scrolling problem, 132 columns

chet@cwjcc.CWRU.EDU (Chet Ramey) (08/04/88)

I'm having a problem with v11r2 xterm, specifically how it handles the vt100
escape sequences that change the screen width from 80 to 132 columns and back.

We have some people here who would like to be able to start an xterm with the
"-132" option, telnet to a VMS VAX, and use a spreadsheet called 20/20.  This
understands DEC terminals, and will output the correct escape sequence to 
resize the screen if you specify a terminal type that can handle resizing when
you start 20/20 (like, for example, "vt100-w").

The problem is that when 20/20 decides that you have a terminal that can handle
132 columns (based on what you tell it), and outputs the DECCOLM escape
sequence to do it, xterm gets confused.  The first problem appears to be that 
xterm, in the code in "charproc.c" that handles that escape sequence, never 
seems to change its idea of the maximum screen width (screen->max_col), if it
is different than what was there already (i.e. if XtMakeResizeRequest is
called).  A simple assignment to screen->max_col seems to work for that, but 
I'm sure it's The Wrong Way.  (BTW, a call to ScreenResize there doesn't seem
to do the job, but I'm sure that the stuff that ScreenResize does, like 
increasing the screen buffer arrays, resetting the scrolling region, etc. is
what needs to be done to solve the second problem we're having.)

The next problem is that once that assignment is put in, xterm can handle the
drawing to 132 columns that 20/20 does, but seems to get confused about the
scrolling region.  Our people  use 20/20 on VAXstation 2000's, and 20/20 
understands the arrow keys, so naturally they try to use the arrow keys to
move down through the spreadsheet.  Xterm will correctly refresh only the top
or bottom row of the window; all other lines move up or down as required, but
only through 80 columns -- the rest of the line doesn't get scrolled.  This
area contains the "totals" column in 20/20, so after a while you see that 
you spent $250,000 last year for erasers, which is sometimes a shock :-).  
The 20/20 Refresh Screen command redraws everything correctly out to 132
columns.

I've been looking at this for a little while, and I'm really confused.  Can
anyone help?

Chet Ramey
Unix Engineer (:-))
A. R. Jennings Computing Center, CWRU
chet@cwjcc.CWRU.EDU


| Chet Ramey            chet@cwjcc.CWRU.EDU    chet@alpha.CES.CWRU.EDU
|
|	"It is, it is a glorious thing to be a pirate king"