From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  2-MAY-1991 18:58:35.45
To:	ARISIA::EVERHART
CC:	
Subj:	Re: edt and term page length

From:	RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.97)
	 id AA11681; Thu, 2 May 91 16:47:26 EDT
Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Thu,  2 MAY 91 12:32:15 PDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA03956; Thu, 2 May 91 12:24:03 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 2 May 91 15:57:17 GMT
From: rti!bcw@mcnc.org  (Bruce Wright)
Organization: Research Triangle Institute, RTP, NC
Subject: Re: edt and term page length
Message-Id: <1991May2.155717.3867@rti.rti.org>
References: <672933953@romeo.cs.duke.edu>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

In article <672933953@romeo.cs.duke.edu>, dryfoos@duke.cs.duke.edu (James D. Dryfoos) writes:
> I use an X window device and normal have windows set to page=40.
> This works fine for all applications including TPU.
> However, now and then I like to jump into edt (because it is quick) and
> this causes problems.  It seems to set the  LENGTH back to 25 or something.
> Then I have to do a set erm/page=41 and
> then a set term/page=40 (if I do a 40 first it does not fix problem).
> The actuak window size stays the same, but the scrolling area is what is
> affected.  Is there some way to sfix this in EDT?

This is a problem with things besides X terminals;  a similar problem
happens on the VT420 when you put it into one of its longer page modes
(25-line, 36-line, 48-line).

There isn't a good way to fix it in EDT itself as far as I know;  and
DEC has said that they don't intend to do anything else with EDT (like
allowing it to use more than 24 lines like TPU does).  But the fix
_ought_ to be easy - all that's missing is a single 3-character escape 
sequence to reset the scrolling region:  ESC [ r .  (There _is_ a
minor problem with this:  there are a few non-DEC terminals that don't
properly interpret this sequence, and don't make the proper defaults
for the new scrolling region.  The proper behavior has been documented
ever since the VT100, so there's no question that the terminals in
question are broken.  Not that malfunctioning 3rd-party equipment has
ever received much sympathy from DEC before ...).  Also, to mimic
the behavior of EDT, you'd want to position the cursor to the bottom
of the screen (ESC [ r homes the cursor).

If you want to use EDT rather than TPU, about all I can suggest for
an automatic solution (as opposed to a trivial program or command
file to reset the damage once it's done) would be to embed this
sequence in a command file that actually starts up EDT & defining a
symbol to run the command file:

---------------- cut here ----------------------
$!
$! RUNEDT - Run EDT with resetting scrolling region
$!
$!	Use:	edt :== @sys$login:runedt
$!
$ assign/user/nolog tt: sys$input
$ assign/user/nolog tt: sys$output
$ assign/user/nolog tt: sys$error
$ edit/edt 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8'
$ esc[0,8] = %x1b
$ page = f$string (f$getdvi ("TT:", "TT_PAGE"))
$ write sys$output esc + "[1;" + page + "r" +	-
		   esc + "[" + page + ";1H"
---------------- cut here ----------------------

This command file uses the current VMS page length to avoid the
problem with some terminals, but if the VMS page length isn't the
same as the terminal's actual page length, then the behavior will
be different from that of ESC [ r (and probably not what you
would really want).  I have also added the extra ";1" to the
cursor position sequence in case any terminals out there don't
handle this case properly 8-).

Enjoy -
					Bruce C. Wright

