T.R | Title | User | Personal Name | Date | Lines |
---|
3393.1 | try rebooting? | OXNARD::KLEE | Ken Lee | Tue Sep 25 1990 16:53 | 6 |
| I had a similar problem when I upgraded to the 4.1EFT. We were having
alot of network trouble at the time. Later, when the network was
quiter, I rebooted, the problem went away, and hasn't returned since.
Ken
|
3393.2 | stty -tabs | HOCKEY::HAYES | I ain't no flatlander!! | Tue Sep 25 1990 23:11 | 6 |
|
I don't run motif, but I had this same problem with regular DECwindows.
Try doing an 'stty -tabs' in your .login or .cshrc. This seemed to keep
vi from getting confused.
Donald
|
3393.3 | HTS bug in csh command line editing | DECWIN::MESSENGER | Bob Messenger | Wed Sep 26 1990 13:52 | 7 |
| Are you using the command line editing feature of the V40 csh? When you
type an uparrow or downarrow, it writes two HTS characters (backspaces with
the 8th bit set) to stdout. These are eight bit control characters that
set horizontal tab stops. To restore your default tab stops, cat a file
(or execute a shell script) that writes the escape sequence ESC c.
-- Bob
|
3393.4 | Bingo, Bob! | CIM::KAIRYS | Michael Kairys | Wed Sep 26 1990 16:05 | 10 |
| Ah, the sweet voice of reason! Bob, that must be it.
"stty -tabs" seems to make the problem disappear, too, as noted in a
previous reply. Given your understanding of this stuff, would you say
(1) this is indeed an alternative fix, and (2) this is an okay way to
run in general (i.e. this won't confuse somebody else?
Otherwise I guess I have to wrap vi in a shell script, as you suggest
(unclean! (:-))
Anyway, thank you so much for casting some light on this!
|
3393.5 | | DECWIN::MESSENGER | Bob Messenger | Thu Sep 27 1990 11:50 | 22 |
| Assuming that I'm right that csh's command line editing is corrupting your
tab stops, you have several choices:
1. Stop using csh's command line editing.
2. After using csh command line editing, cat a file containing ESC c
to reset the tab stops.
3. stty -tabs so the terminal driver will expand tabs into spaces
4. Run in VT100 mode, so the HTS control characters will be
interpreted as backspaces (which might have been csh's intention).
5. Enclose vi, and any other application that might be affected by
corrupted tab stops, in a shell script that writes ESC c before
starting the application.
Personally I'd choose option 1. There is a shell I've seen called tcsh that
lets you do real DCL-style command line editing and doesn't corrupt your
tab stops.
-- Bob
|
3393.6 | And the exact bug is... | CIM::KAIRYS | Michael Kairys | Thu Sep 27 1990 15:56 | 88 |
| <<< NAC::DISK$WORK295:[NOTES$LIBRARY]ULTRIX.NOTE;1 >>>
-< Volume 3, Take a RISC with ULTRIX... >-
================================================================================
Note 2562.6 HELP - vi very confused! 6 of 6
BACHUS::DEVOS "Manu Devos - TSSC/CS Brussels" 80 lines 27-SEP-1990 12:47
-< Use stty -tabs in your .login >-
--------------------------------------------------------------------------------
Hi everybody,
In ULTRIX(tm) V3.1D and V4.0, the "csh" accepts the use of the
cursor keys to see and recall the previously used commands.
There is a bug in the routine handling the detection of the first
"cursor key" strike that causes the setting of two extra tab
positions which disturb certain utilities using the tabulations
like vi, ls, paste etc.
I will try to explain that:
If your tty is setup with 'ctlecho' which means that any Control
character is echoed by "^x", the cursor down key will be displayed
^[[B (The screen must be normally setup for "Normal Cursor Key").
These codes are received by the CSH which thinks : "As the CTLECHO
mode is on, the screen goes to display these four characters (^[[B)
and it will be nice if I can remove them from the screen because
these codes now are used to re-display the last command."
The CSH must send four BS code (0x08) follow by four spaces and
one CR-LF to erase the echoed cursor down key and to position the
cursor on the next line. After that, CSH will set the cursor and
keypad in application mode, re-display the last command and send
as many backspaces as needed to position the cursor on the first
character of the command. Now, if you type RETURN (Not Enter), the
displayed command will be executed and the cursor and keypad will
be restored in Normal and Numeric mode respectively.
If I set a VT300 in "display controls" mode, that sequence should
be displayed on the screen as:
csh> ^[[BBBBB CLE[?1hE=cd /etc E[KBBBBBBBB
SSSS RFS S S SSSSSSSS
C C C
---- ---- ----- -------- --------
| ---- | -- | -- | --- |
| | | | | | | | +--> 8 x BS
| | | | | | | +--------> CSI K erase till end line
| | | | | | +--------------> Display previous command.
| | | | | +------------------> Set Keypad in Application
| | | | +----------------------> Set Cursor in Application
| | | +-------------------------> Carr. return + Line feed.
| | +----------------------------> 4 spaces to erase ^[[B
| +--------------------------------> 4 BS to go backwards
+------------------------------------> Codes of Cursor down.
The bug now is that the coding of the four bakspace codes has been
written "0x88 0x88" instead of "0x08 0x08 0x08 0x08" and the result
is that 0x88 is the code HS (Set Horizontal tab in the Dec supple-
mentary code) and curiously the 4 spaces have been reduced to two.
This gives now :
csh> ^[[BHH CLE[?1hE=cd /etc E[KBBBBBBBB
SS RFS S S SSSSSSSS
C C C
----
|
+---> Two Horizontal tab set codes + two spaces.
You can easily prove this malfunction by connecting a VT220 to
your system and set it to display the control codes, but you have
to work not in vt100 mode as this mode strip the 8th bits and thus
restore two backspace codes.
Finally, to avoid all these problem, I decided to put the command
"stty -tabs" in my .login file. This command causes that each tab
is replaced by the corresponding number of spaces. It is also a
good trick if you connect also your terminal frequently to a VMS
account which can also change the tab positions.
Warning! if your .login contains a command 'tset', you must put
the "stty -tabs" AFTER the 'tset -I' as the initialization of
your terminal can restore 'tabs'.
Sorry for the length of this note.
Regards, Manu
|
3393.7 | Who decided that keypad mode application was "better?" | IO::MCCARTNEY | James T. McCartney III - DTN 381-2244 ZK02-2/N24 | Thu Oct 04 1990 13:54 | 20 |
|
csh> ^[[BHH CLE[?1hE=cd /etc E[KBBBBBBBB
SS RFS S S SSSSSSSS
C C C
^^
||
One might also ask why you're sending this to the
screen since it screws up the command echo.
Also, I notice that you unconditionally reset keypad and cursors
to be in application mode. Who asked? I certainly didn't -- I like
my keys to work the way I set them -- software should keep it's hands
off unless explicitly asked to change it!
This total disregard of user settings (since there is no way to know
the state and restore it) has the potential to cause some serious
interoperability problems for layered products!
James McCartney
DECforms Development
|