[BusyBox] bug#1221: Busybox 0.60.1 - Correct cursor functionality in vi.c
Andrew Tipton
andrew at cadre5.com
Thu Nov 15 11:00:03 UTC 2001
Package: busybox
Version: 0.60.1
Severity: normal
In most implementations of vi, the cursor keys (along with pageup, pagedown,
home, end) will always work, regardless of what the current mode is. Much
more convenient to be able to use the cursor keys while in 'insert' mode,
for example. This patch simply skips directly to the "default" key
processing code (bypassing the checks for insert and replace mode) if the
key is a cursor key.
diff vi.c vi.c.orig
792,805d791
<
< /* if this is a cursor key, skip these checks */
< switch (c) {
< case VI_K_UP:
< case VI_K_DOWN:
< case VI_K_LEFT:
< case VI_K_RIGHT:
< case VI_K_HOME:
< case VI_K_END:
< case VI_K_PAGEUP:
< case VI_K_PAGEDOWN:
< goto key_cmd_mode;
< }
<
830d815
< key_cmd_mode:
Andrew Tipton
More information about the busybox
mailing list