Forum

Reverse Text in VI
 
Notifications
Clear all

Reverse Text in VI

0 Posts
2 Users
0 Reactions
231 Views
(@RayColbert)
New Member
Joined: 55 years ago
Posts: 2
Topic starter  

I am evaluating Absolute Telnet 1.84 and have found that in VI on Solaris, when I press 'i' for insert mode and then hit any arrow key while you are in insert mode, the screen goes reverse text. The reverse text won't go away until you scroll the screen. It also occurs for other commands such as 'a','o',and 'r'.

Thank you,

Ray Colbert
Father Flanagan's Boys Home

[size=1][ June 14, 2002, 12:01 PM: Message edited by: Brian T. Pence ][/size]


   
ReplyQuote
(@bpence)
Member Admin
Joined: 1 year ago
Posts: 1375
 

Could be a number of things...

1. Check to make sure that the client and host agree on what terminal type is being used. Look at the TERM environment variable on the host and Options->Properties->VT Options on the client.

2. It could be that vi is not expecting cursor keypresses in input mode, so it is getting confused. Besides the reverse text, does the cursor movement work? Does cursor movement work in command mode?

3. Is this problem reproducable *every* time???

Can you give me access to this box for testing?


   
ReplyQuote
(@RayColbert)
New Member
Joined: 55 years ago
Posts: 2
Topic starter  

Hi,

1. Both the TERM environment variable and the client are set to VT220.

2. Pressing the cursor takes you out of insert mode on the first keypress and then moves the cursor (now in command mode) on subsequent presses. But that first keypress also changes the screen to reverse video. Any subsequent inserting, appending, etc. will be in normal video, but the rest of the screen is in reverse video.

When I set the client to use normal telnet instead of SSH, the problem doesn't occur.

3. Yes, it is 100% reproduceable. But I doubt I would be allowed to give access to our system. Other SSH clients that I am evaluating do not do this, the screen may flash, but I do like Absolute Telnet better other that this problem.

Thank you,

Ray Colbert


   
ReplyQuote
(@bpence)
Member Admin
Joined: 1 year ago
Posts: 1375
 

Well, it seems that the problem begins with the fact that when you press a cursor key, an escape sequence is being sent to the host. The first character of the escape sequence is, of course, the escape character, which normally is used to exit input mode and go back to command mode.

The rest of the escape sequence is splatting into command mode, which is doing who knows what...

Now...

When you say that the same thing doesn't occur in telnet mode, do you mean that hitting an arrow key jumps back to command mode and just doesn't do reverse text, or cursor keys work as you would expect in both command and input mode???

Same question for other ssh apps...

FWIW, I use vim (vi improved), and it recognizes the cursor keys even in input mode so it doesn't splat back into command mode. I'm guessing that the best we'll be able to do with regular vi is to figure out why it is reversing text.

Can you get me a logfile and a screen snapshot of your entire session?? Do a File->Open LOG before you login, and File->Close LOG after the screen turns reversed. Take a snapshot and send the snapshot and logfile to me vi e-mail

(bpence at celestialsoftware.net)


   
ReplyQuote
(@bpence)
Member Admin
Joined: 1 year ago
Posts: 1375
 

AbsoluteTelnet 1.84 was not refreshing the screen when going from reverse video to normal video, so the text remained reversed until the next screen refresh. This has now been fixed in the current beta of AbsoluteTelnet 1.85.


   
ReplyQuote
Share: