alias expansion fix in case statements

This commit is contained in:
Chet Ramey
2021-03-29 10:25:18 -04:00
parent b37342db4f
commit 65822e5011
6 changed files with 46 additions and 9 deletions
+11
View File
@@ -177,6 +177,10 @@ static char *_rl_term_kD;
/* Insert key */
static char *_rl_term_kI;
/* Page up and page down keys */
static char *_rl_term_kP;
static char *_rl_term_kN;
/* Cursor control */
static char *_rl_term_vs; /* very visible */
static char *_rl_term_ve; /* normal */
@@ -415,6 +419,8 @@ static const struct _tc_string tc_strings[] =
{ "kD", &_rl_term_kD }, /* delete */
{ "kH", &_rl_term_kH }, /* home down ?? */
{ "kI", &_rl_term_kI }, /* insert */
{ "kN", &_rl_term_kN }, /* page down */
{ "kN", &_rl_term_kP }, /* page up */
{ "kd", &_rl_term_kd },
{ "ke", &_rl_term_ke }, /* end keypad mode */
{ "kh", &_rl_term_kh }, /* home */
@@ -478,6 +484,7 @@ _rl_init_terminal_io (const char *terminal_name)
_rl_term_goto = _rl_term_pc = _rl_term_ip = (char *)NULL;
_rl_term_ks = _rl_term_ke =_rl_term_vs = _rl_term_ve = (char *)NULL;
_rl_term_kh = _rl_term_kH = _rl_term_at7 = _rl_term_kI = (char *)NULL;
_rl_term_kN = _rl_term_kP = (char *)NULL;
_rl_term_so = _rl_term_se = (char *)NULL;
#if defined(HACK_TERMCAP_MOTION)
_rl_term_forward_char = (char *)NULL;
@@ -540,6 +547,7 @@ _rl_init_terminal_io (const char *terminal_name)
_rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL;
_rl_term_kh = _rl_term_kH = _rl_term_kI = _rl_term_kD = (char *)NULL;
_rl_term_ks = _rl_term_ke = _rl_term_at7 = (char *)NULL;
_rl_term_kN = _rl_term_kP = (char *)NULL;
_rl_term_mm = _rl_term_mo = (char *)NULL;
_rl_term_ve = _rl_term_vs = (char *)NULL;
_rl_term_forward_char = (char *)NULL;
@@ -629,6 +637,9 @@ bind_termcap_arrow_keys (Keymap map)
rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete);
rl_bind_keyseq_if_unbound (_rl_term_kI, rl_overwrite_mode); /* Insert */
rl_bind_keyseq_if_unbound (_rl_term_kN, rl_history_search_forward); /* Page Down */
rl_bind_keyseq_if_unbound (_rl_term_kP, rl_history_search_backward); /* Page Up */
_rl_keymap = xkeymap;
}