VI doesn't restore window buffer contents on Solaris 2.5.1 using CDE

VI doesn't restore window buffer contents on Solaris 2.5.1 using CDE

Post by Axel Schweige » Wed, 22 Oct 1997 04:00:00



I have a user who is used to the bahaviour of vi under SunOS in an
Xterm. Upon exiting vi the contents of the window in which vi was
started were properly restored so that scrolling back allowed access
to the information on the screen prior to starting vi. Using vi
under Solaris the contents of the screen buffer are not properly
restored. This doesn't sound like a big problem but for this particular
user it is. I have no idea on how to fix this. Can you please email
suggestions.

Thanks
Axel

 
 
 

VI doesn't restore window buffer contents on Solaris 2.5.1 using CDE

Post by Alvin Sylvai » Wed, 22 Oct 1997 04:00:00



> I have a user who is used to the bahaviour of vi under SunOS in an
> Xterm. Upon exiting vi the contents of the window in which vi was
> started were properly restored so that scrolling back allowed access
> to the information on the screen prior to starting vi. Using vi
> under Solaris the contents of the screen buffer are not properly
> restored. This doesn't sound like a big problem but for this particular
> user it is. I have no idea on how to fix this. Can you please email
> suggestions.

> Thanks
> Axel

We have a programmer here who, even before we started using
Solaris, had a "vi script" which opens a new window for the
"vi" session.  When he runs "vi", the old window is still
there, and the new "vi window" has his edit session, complete
with the filename on the frame.  When he exits "vi", the
"vi window" goes away.

It's not exactly the same thing as the SunOS version of having
two screen buffers, but, if your user will accept it, it can be
implemented easily.  I can send you a script if you like.

:-)

 
 
 

VI doesn't restore window buffer contents on Solaris 2.5.1 using CDE

Post by Steve Bellen » Thu, 23 Oct 1997 04:00:00




Quote:>I have a user who is used to the bahaviour of vi under SunOS in an
>Xterm. Upon exiting vi the contents of the window in which vi was
>started were properly restored so that scrolling back allowed access
>to the information on the screen prior to starting vi. Using vi
>under Solaris the contents of the screen buffer are not properly
>restored. This doesn't sound like a big problem but for this particular
>user it is. I have no idea on how to fix this. Can you please email
>suggestions.

>Thanks
>Axel

cp sunOS4:/usr/share/lib/terminfo/x/xterm sunOS5:/usr/share/lib/terminfo/x/xterm
--

 
 
 

VI doesn't restore window buffer contents on Solaris 2.5.1 using CDE

Post by Andreas Karr » Thu, 23 Oct 1997 04:00:00



>cp sunOS4:/usr/share/lib/terminfo/x/xterm sunOS5:/usr/share/lib/terminfo/x/xterm

Correct, albeit a little terse.

There are a lot of different "xterm" terminal descriptions floating
around. most xterms (and some vtxxx-like terminals, but not a real VT100
or VT220) have an alternate text buffer that can be used for
screen-oriented programs like vi, slrn, less, mc etc.

The "old" terminfo description had entries for the "smcup" and
"rmcup" capabilities like:

  smcup=\E7\E[?47h
  rmcup=\E[2J\E[?47l\E8

(\E7 = save cursor position, \E8 = restore cursor position, \E2J = clear screen
 \E[?47h = enter alternate buffer, \E[?47l = exit alternate buffer)

You could extract the human-readable version with "infocmp", add these
capabilities, possibly rename the name of the terminal to something
else, and convert the ascii form to the terminfo binary form using "tic".

 - Andi

 
 
 

VI doesn't restore window buffer contents on Solaris 2.5.1 using CDE

Post by Oleg Onatzevitc » Thu, 23 Oct 1997 04:00:00



> I have a user who is used to the bahaviour of vi under SunOS in an
> Xterm. Upon exiting vi the contents of the window in which vi was
> started were properly restored so that scrolling back allowed access
> to the information on the screen prior to starting vi. Using vi
> under Solaris the contents of the screen buffer are not properly
> restored.

You need to modify the terminfo description for xterm by adding the
following to the "/usr/share/lib/terminfo/x/xterm" file.

        rmcup=\E[2J\E[?47l\E8,smcup=\E7\E[?47h,

This can be accomplished as follows:

a) cd /usr/share/lib/terminfo/x
b) cp xterm xterm.before-I-hacked-it
c) /bin/infocmp xterm > xterm.hacked
d) vi xterm.hacked (add the rmcup entry listed above)
e) mv xterm.hacked xterm
f) /bin/tic -v xterm

That's about it.

Oleg.

=======================================================================

ESM Services, Inc.(www.esm.com) || Phone: (212) 449-2355
1120 Sixth Ave, 4th fl.         ||   Fax: (212) 449-2508
New York, NY 10036              || Pager: (917) 556-0665 Pin# 0898605

 
 
 

VI doesn't restore window buffer contents on Solaris 2.5.1 using CDE

Post by Ned Daniel » Thu, 23 Oct 1997 04:00:00




Quote:

> You need to modify the terminfo description for xterm by adding the
> following to the "/usr/share/lib/terminfo/x/xterm" file.

>    rmcup=\E[2J\E[?47l\E8,smcup=\E7\E[?47h,

I know this isn't the right group, but as long as we're talking about
it... does anyone know why this doesn't work correctly on an SGI
(running IRIX 6.2)? the screen gets restored, but the cursor ends up
at the top of the screen, which isn't really very useful.

the infocmp entry for xterm appears to be exactly the same on my SGI
and my Ultra, but the Ultra correctly places the cursor at the bottom.
is this a 'feature' of the SGI?

--

Experimental Electrophysiology Laboratory
Box 90295, Duke University
Durham, NC  27708   (919) 660-5111

 
 
 

VI doesn't restore window buffer contents on Solaris 2.5.1 using CDE

Post by T.E.Dicke » Thu, 23 Oct 1997 04:00:00


:>   rmcup=\E[2J\E[?47l\E8,smcup=\E7\E[?47h,
: I know this isn't the right group, but as long as we're talking about
: it... does anyone know why this doesn't work correctly on an SGI
: (running IRIX 6.2)? the screen gets restored, but the cursor ends up
: at the top of the screen, which isn't really very useful.
The \E7 restores the cursor to its original location before you ran
the (vi or similar) program.  That's xterm, anyway (winterm may not do
that).

: the infocmp entry for xterm appears to be exactly the same on my SGI
: and my Ultra, but the Ultra correctly places the cursor at the bottom.
: is this a 'feature' of the SGI?

--
Thomas E.*ey

http://www.veryComputer.com/

 
 
 

VI doesn't restore window buffer contents on Solaris 2.5.1 using CDE

Post by Nick » Fri, 24 Oct 1997 04:00:00


Does anyone know how to fix this problem for a dtterm?
Thanks
Nick

 
 
 

1. vi not restoring window contents under Solaris

We noticed the same behavior.  Our solution was to rebuild the termcap
entry for xterm using the system terminfo file.  This is a two step
process which required no editing of any files.  You will either replace
the original termcap entry or use environment variables to point to the
new termcap entry.  I'm unsure why the resulting termcap file for xterm
is not the same as what was delivered.  But you'll find that you have the
previous behavior for vi.

Of course you could alway use emacs...

-- Shawn

=============================================================================

Science Applications International Corp.
10260 Campus Point Drive                        phone: (619) 546-6096
San Diego, Ca. 92121                              fax: (619) 458-4993
=============================================================================

2. Aztech Waverider Problem

3. vi doesn't restore the terminal (text) in Solaris 2.4

4. including data in executables

5. xterm doesn't restore screen after vi or less

6. PPP not replacing default route

7. using 'restore' to restore one file

8. Where to purchase Solaris x86

9. vi: window restore under Solaris

10. vi: puting buffer contents into another file?

11. HELP: buffered copy using stdio doesn't work

12. Weird behavior after flash install (CDE terminal window doesn't work!)

13. FCode for SBus Frame Buffer - Solaris "boot -r" doesn't see it?