Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!lll-lcc!pyramid!prls!mips!rick From: rick@mips.UUCP (Rick Frazier) Newsgroups: comp.sys.amiga Subject: More bugs in DBW's VT100 (OR ANY VT100 and another system) Message-ID: <782@mips.UUCP> Date: Tue, 2-Dec-86 11:45:20 EST Article-I.D.: mips.782 Posted: Tue Dec 2 11:45:20 1986 Date-Received: Tue, 2-Dec-86 21:18:37 EST References: <3131@ece-csc.UUCP> <341@pttesac.UUCP> <6478@ut-sally.UUCP> Organization: MIPS ... where RISC is a way of life Lines: 49 > --------------------- > I compiled with Lattice (version ?.??). If I keep pressing any of the arrow > keys in vi, a lot of lines with just one character (usually "C") get inserted > in the in the file. > I'm sure that many of the "netlanders" out there have seen this particular "symptom" before , especially those working on *nix systems. It seems to be a result of the control codes that the vt100 sends for the arrow keys, with interaction due to character buffering: In vi, an escape [ESC] (alone) signals the program to exit the current mode. However, the arrow keys for a vt100 terminals send [ESC] O A for the up, [ESC] O B for the down, [ESC] O C for the right, and [ESC] O D for the left arrows. Since O is the vt100 command for "open line above", the result, if you are trying to scroll up, is a string of lines with a capital A in column 1. (the editor sees the following: [ESC] (quit doing last command) O (open line above) A (this is the character it puts on the line) for each time the up arrow is pressed. Two things seem to be involved: 1) the rate at which you press the key (or repeat rate of the terminal) 2) the system load. When a system is lightly loaded, there is time to take each character individually and operation is what we consider normal. As the system load increases, the characters get stacked in a buffer, and there is no data to indicate relative timing of the input of the characters, and the editor seems to take these characters (from the buffer) as individual keystrokes, not as a composite keycode (what was actually sent when you pressed the arrow key) A third event can cause the same result is pressing any of the arrow keys while you are in any of the insert modes (I just did in rn, and it reminded me in the usual fashion, a string of single-character lines). This particular problem is an operator error, and cannot be considered a fault of any vt100 emulator/terminal/system. Whether the (long) response above is directly applicable to the program running on the amiga or not, I think it is important that those out there without the "benefit" of having lived on *nix systems for years be aware that we have lived with this problem all along, so the problem may not be a fault in the program at all........ It's a FEATURE of vi :-) and has been for as long as I have been working on *nix systems. -- --Rick Frazier-- DISCLAIMER: The above is individual opinion (the result of my imperfect recall of facts, real or imagined) in no way representing anyone else. UUCP: {decvax,ucbvax,ihnp4}!decwrl!mips!rick DDD: 408-720-1700 x278