Patch 9.0.0943
Problem:    Pretending to go out of Insert mode when Esc is received has side
            effects.
Solution:   When the kitty keyboard protocol is enabled expect Esc to always
            be the start of an escape sequence.
Files:      src/getchar.c


*** ../vim-9.0.0942/src/getchar.c       2022-11-24 13:27:32.389881082 +0000
--- src/getchar.c       2022-11-24 20:21:02.867145433 +0000
***************
*** 3263,3274 ****
   * get a character: 3. from the user - handle <Esc> in Insert mode
   */
                /*
!                * Special case: if we get an <ESC> in insert mode and there
                 * are no more characters at once, we pretend to go out of
!                * insert mode.  This prevents the one second delay after
                 * typing an <ESC>.  If we get something after all, we may
                 * have to redisplay the mode. That the cursor is in the wrong
                 * place does not matter.
                 */
                c = 0;
                new_wcol = curwin->w_wcol;
--- 3263,3276 ----
   * get a character: 3. from the user - handle <Esc> in Insert mode
   */
                /*
!                * Special case: if we get an <ESC> in Insert mode and there
                 * are no more characters at once, we pretend to go out of
!                * Insert mode.  This prevents the one second delay after
                 * typing an <ESC>.  If we get something after all, we may
                 * have to redisplay the mode. That the cursor is in the wrong
                 * place does not matter.
+                * Do not do this if the kitty keyboard protocol is used, every
+                * <ESC> is the start of an escape sequence then.
                 */
                c = 0;
                new_wcol = curwin->w_wcol;
***************
*** 3277,3282 ****
--- 3279,3285 ----
                        && typebuf.tb_len == 1
                        && typebuf.tb_buf[typebuf.tb_off] == ESC
                        && !no_mapping
+                       && kitty_protocol_state != KKPS_ENABLED
                        && ex_normal_busy == 0
                        && typebuf.tb_maplen == 0
                        && (State & MODE_INSERT)
*** ../vim-9.0.0942/src/version.c       2022-11-24 20:01:14.886805253 +0000
--- src/version.c       2022-11-24 20:19:57.667124096 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     943,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
132. You come back and check this list every half-hour.

 /// 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/20221124202352.EA1A71C091A%40moolenaar.net.

Raspunde prin e-mail lui