Patch 9.0.0791
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)
Files:      src/term.c


*** ../vim-9.0.0790/src/term.c  2022-10-14 12:08:19.312833085 +0100
--- src/term.c  2022-10-18 19:16:00.016315376 +0100
***************
*** 846,855 ****
      {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"},
      // An extra set of function keys for vt100 mode
      {K_XF1,           "\033O*P"},
      {K_XF2,           "\033O*Q"},
--- 846,855 ----
      {K_RIGHT,         "\033O*C"},
      {K_LEFT,          "\033O*D"},
      // An extra set of cursor keys for vt100 mode
!     {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,883 ****
      {K_HELP,          "\033[28;*~"},
      {K_UNDO,          "\033[26;*~"},
      {K_INS,           "\033[2;*~"},
!     {K_HOME,          "\033[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_S_END,              "\033O2F"},
      // {K_C_END,              "\033O5F"},
      {K_KEND,          "\033[4;*~"},
--- 871,883 ----
      {K_HELP,          "\033[28;*~"},
      {K_UNDO,          "\033[26;*~"},
      {K_INS,           "\033[2;*~"},
!     {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[@;*F"},   // Esc [ F or Esc 1 ; F
      // {K_S_END,              "\033O2F"},
      // {K_C_END,              "\033O5F"},
      {K_KEND,          "\033[4;*~"},
***************
*** 5483,5494 ****
                 */
                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)
                    {
--- 5483,5491 ----
***************
*** 5503,5509 ****
                        else if (tp[modslen] != ';' && modslen == slen - 3)
                            // no match for "code;*X" with "code;"
                            continue;
!                       else if (at_code && tp[modslen] != '1')
                            // no match for "<Esc>[@" with "<Esc>[1"
                            continue;
                        else
--- 5500,5507 ----
                        else if (tp[modslen] != ';' && modslen == slen - 3)
                            // no match for "code;*X" with "code;"
                            continue;
!                       else if (termcodes[idx].code[modslen] == '@'
!                                                        && tp[modslen] != '1')
                            // no match for "<Esc>[@" with "<Esc>[1"
                            continue;
                        else
*** ../vim-9.0.0790/src/version.c       2022-10-18 17:25:00.066265566 +0100
--- src/version.c       2022-10-18 19:20:20.888300693 +0100
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     791,
  /**/

-- 
   Another bucket of what can only be described as human ordure hits ARTHUR.
ARTHUR: ... Right!  (to the KNIGHTS) That settles it!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221018182304.199C01C0EE2%40moolenaar.net.

Raspunde prin e-mail lui