0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.0791: at the hit-Enter prompt the End and Home keys may not work

Problem:    At the hit-Enter prompt the End and Home keys may not work.
Solution:   Use the special "@" code for End and Home, like it was done for
            the cursor keys in patch 8.2.2246. (Trygve Aaberge, closes #11396)
This commit is contained in:
Trygve Aaberge
2022-10-18 19:22:25 +01:00
committed by Bram Moolenaar
parent 53c5c9f50c
commit a353282c13
2 changed files with 10 additions and 10 deletions

View File

@@ -846,10 +846,10 @@ static struct builtin_term builtin_termcaps[] =
{K_RIGHT, "\033O*C"},
{K_LEFT, "\033O*D"},
// An extra set of cursor keys for vt100 mode
{K_XUP, "\033[@;*A"},
{K_XDOWN, "\033[@;*B"},
{K_XRIGHT, "\033[@;*C"},
{K_XLEFT, "\033[@;*D"},
{K_XUP, "\033[@;*A"}, // Esc [ A or Esc [ 1 ; A
{K_XDOWN, "\033[@;*B"}, // Esc [ B or Esc [ 1 ; B
{K_XRIGHT, "\033[@;*C"}, // Esc [ C or Esc [ 1 ; C
{K_XLEFT, "\033[@;*D"}, // Esc [ D or Esc [ 1 ; D
// An extra set of function keys for vt100 mode
{K_XF1, "\033O*P"},
{K_XF2, "\033O*Q"},
@@ -871,13 +871,13 @@ static struct builtin_term builtin_termcaps[] =
{K_HELP, "\033[28;*~"},
{K_UNDO, "\033[26;*~"},
{K_INS, "\033[2;*~"},
{K_HOME, "\033[1;*H"},
{K_HOME, "\033[@;*H"}, // Esc [ H or Esc 1 ; H
// {K_S_HOME, "\033O2H"},
// {K_C_HOME, "\033O5H"},
{K_KHOME, "\033[1;*~"},
{K_XHOME, "\033O*H"}, // other Home
{K_ZHOME, "\033[7;*~"}, // other Home
{K_END, "\033[1;*F"},
{K_END, "\033[@;*F"}, // Esc [ F or Esc 1 ; F
// {K_S_END, "\033O2F"},
// {K_C_END, "\033O5F"},
{K_KEND, "\033[4;*~"},
@@ -5483,12 +5483,9 @@ check_termcode(
*/
if (termcodes[idx].modlen > 0 && mouse_index_found < 0)
{
int at_code;
modslen = termcodes[idx].modlen;
if (cpo_koffset && offset && len < modslen)
continue;
at_code = termcodes[idx].code[modslen] == '@';
if (STRNCMP(termcodes[idx].code, tp,
(size_t)(modslen > len ? len : modslen)) == 0)
{
@@ -5503,7 +5500,8 @@ check_termcode(
else if (tp[modslen] != ';' && modslen == slen - 3)
// no match for "code;*X" with "code;"
continue;
else if (at_code && tp[modslen] != '1')
else if (termcodes[idx].code[modslen] == '@'
&& tp[modslen] != '1')
// no match for "<Esc>[@" with "<Esc>[1"
continue;
else

View File

@@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
791,
/**/
790,
/**/