top: fix 'iokey()' flaw preventing proper translations

As it turns out, the very first entry in the 'iokey()'
tinfo_tab was preventing the proper translation of the
simulated PgUp/PgDn keys (ctrl+meta+k/j). Ignoring the
tortured history behind the most recent change to that
entry, this patch restores the previous value and once
again properly translates these particular keystrokes.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2018-06-06 00:00:00 -05:00 committed by Craig Small
parent 0bfe708c4b
commit 42f0a341ba

View File

@ -1138,7 +1138,7 @@ static int iokey (int action) {
const char *str; const char *str;
int key; int key;
} tinfo_tab[] = { } tinfo_tab[] = {
{ "\033\n",kbd_ENTER }, { NULL, kbd_UP }, { NULL, kbd_DOWN }, { "\n", kbd_ENTER }, { NULL, kbd_UP }, { NULL, kbd_DOWN },
{ NULL, kbd_LEFT }, { NULL, kbd_RIGHT }, { NULL, kbd_PGUP }, { NULL, kbd_LEFT }, { NULL, kbd_RIGHT }, { NULL, kbd_PGUP },
{ NULL, kbd_PGDN }, { NULL, kbd_HOME }, { NULL, kbd_END }, { NULL, kbd_PGDN }, { NULL, kbd_HOME }, { NULL, kbd_END },
{ NULL, kbd_BKSP }, { NULL, kbd_INS }, { NULL, kbd_DEL }, { NULL, kbd_BKSP }, { NULL, kbd_INS }, { NULL, kbd_DEL },