Article View: news.software.nn
Article #420! sends "smcup" too soon after command
From: E. Tye McQueen
Date: Wed, 30 Dec 1992 19:14
Date: Wed, 30 Dec 1992 19:14
51 lines
2505 bytes
2505 bytes
I noticed a minor problem with nn 6.4.16 just now. I apologize if this
is already being fixed. I couldn't find anything about it in the FAQ.
The "!" command seems to do things in the following order:
Prompt for the command to execute
Clear the screen
Issue the "rmcup" sequence
Execute the command and wait for it to finish
Issue the "smcup" sequence
Prompt with "!" (in reverse video), waiting for a RETURN
Redraw the screen, putting you back were you started
The problem is that the "smcup" sequence should not be sent until
*after* the user taps RETURN at the "!" prompt.
As it is, doing "!who" from an Xterm session pops back to the "main"
screen which can be scrolled, shows who is logged in, then immediately
pops back to the blank non-scrolling screen to prompt me with a "!".
So I can't see the list of who is logged in that I just asked for.
You can work around this by changing smcup and rmcup to not send
\E[?47l and \E[?47h, but that disables a feature that is nice to have
for most other full-screen programs.
Also note that if you change this you need to be careful and not
introduce a bug that some versions of vi have where issuing several
commands in a row causes "rmcup" to be sent multiple times which (on
some versions of Xterm) almost seems to get the "main," scrolling
screen confused with the non-scrolling, "full-screen editor" screen.
So the sequence should be something like:
Prompt for the command to execute
Clear the screen
Issue the "rmcup" sequence
Do
Execute the command and wait for it to finish
Prompt with "!" (in reverse video), waiting for a RETURN
Until they don't enter a command at the above prompt
Issue the "smcup" sequence
Redraw the screen, putting you back were you started
So that the `clear screen' and `Issue "rmcup"' steps are not done
after you enter a second command to be executed.
Thanks,
tye@spillman.com Tye McQueen, E.
----------------------------------------------------------
Nothing is obvious unless you are overlooking something.
----------------------------------------------------------
Technical Details
Message-ID:
<1992Dec30.191436.19040@spillman.uucp>Path:
arc1-ca.pugleaf.net!sparky!uunet!spillman!tyeShow Full Headers
Complete Article Headers
Newsgroups: news.software.nn Path: arc1-ca.pugleaf.net!sparky!uunet!spillman!tye From: tye@spillman.uucp (E. Tye McQueen) Subject: ! sends "smcup" too soon after command Message-ID: <1992Dec30.191436.19040@spillman.uucp> Date: Wed, 30 Dec 1992 19:14:36 GMT Organization: Spillman Data Systems Lines: 51