From kargl@troutmask.apl.washington.edu  Thu Jan 16 17:36:29 1997
Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.54])
          by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id RAA01117
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 16 Jan 1997 17:36:27 -0800 (PST)
Received: (from root@localhost) by troutmask.apl.washington.edu (8.8.4/8.7.3) id RAA03987; Thu, 16 Jan 1997 17:37:45 -0800 (PST)
Message-Id: <199701170137.RAA03987@troutmask.apl.washington.edu>
Date: Thu, 16 Jan 1997 17:37:45 -0800 (PST)
From: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
Reply-To: kargl@troutmask.apl.washington.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: vi escape keys over slow connection are dropped
X-Send-Pr-Version: 3.2

>Number:         2510
>Category:       bin
>Synopsis:       arrow keys (escape codes) are dropped
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 16 17:40:01 PST 1997
>Closed-Date:    Sat Jan 18 00:12:43 MET 1997
>Last-Modified:  Sat Jan 18 00:13:15 MET 1997
>Originator:     Steven G. Kargl
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Applied Physics Lab
>Environment:
FreeBSD 2.2-SNAP (October vintage) connected to a FreeBSD-current
via ppp and a 14.4k modem.
	

>Description:

Using arrow keys in vi will result in an A, B, C, or D inserted in the
text rather than the intended motion of move right, left, up, or down.

The .exrc file contains:

map! ^[[A ^[ka
map! ^[[B ^[ja
map! ^[[C ^[la
map! ^[[D ^[ha
map! ^[OA ^[ka
map! ^[OB ^[ja
map! ^[OC ^[la
map! ^[OD ^[ha

to map the key arrow keys to the h, j, k, l motion key.


>How-To-Repeat:

Edit any file over a slow connection with vi and try to move
through the file with arrow keys.

>Fix:

Increase the default escapetime from 300ms to 600ms.
	

*** options.c.orig	Thu Jan 16 17:24:36 1997
--- options.c	Thu Jan 16 17:26:04 1997
***************
*** 341,347 ****
  	(void)snprintf(b1, sizeof(b1),
  	    "directory=%s", (s = getenv("TMPDIR")) == NULL ? _PATH_TMP : s);
  	OI(O_DIRECTORY, b1);
! 	OI(O_ESCAPETIME, "escapetime=3");
  	OI(O_KEYTIME, "keytime=6");
  	OI(O_MATCHTIME, "matchtime=7");
  	(void)snprintf(b1, sizeof(b1), "msgcat=%s", _PATH_MSGCAT);
--- 341,347 ----
  	(void)snprintf(b1, sizeof(b1),
  	    "directory=%s", (s = getenv("TMPDIR")) == NULL ? _PATH_TMP : s);
  	OI(O_DIRECTORY, b1);
! 	OI(O_ESCAPETIME, "escapetime=6");
  	OI(O_KEYTIME, "keytime=6");
  	OI(O_MATCHTIME, "matchtime=7");
  	(void)snprintf(b1, sizeof(b1), "msgcat=%s", _PATH_MSGCAT);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Sat Jan 18 00:12:43 MET 1997 
State-Changed-Why:  
Suggested fix applied in rev 1.3 of options.c. 

>Unformatted:
