Patch 8.1.2191
Problem:    When using modifyOtherKeys CTRL-X mode may not work.
Solution:   Recognize a control character also in the form with a modifier.
Files:      src/getchar.c


*** ../vim-8.1.2190/src/getchar.c       2019-10-17 22:58:59.062497024 +0200
--- src/getchar.c       2019-10-20 15:51:46.907444503 +0200
***************
*** 2143,2148 ****
--- 2143,2166 ----
  } map_result_T;
  
  /*
+  * Check if the bytes at the start of the typeahead buffer are a character 
used
+  * in CTRL-X mode.  This includes the form with a CTRL modifier.
+  */
+     static int
+ at_ctrl_x_key(void)
+ {
+     char_u  *p = typebuf.tb_buf + typebuf.tb_off;
+     int           c = *p;
+ 
+     if (typebuf.tb_len > 3
+           && c == K_SPECIAL
+           && p[1] == KS_MODIFIER
+           && (p[2] & MOD_MASK_CTRL))
+       c = p[3] & 0x1f;
+     return vim_is_ctrl_x_key(c);
+ }
+ 
+ /*
   * Handle mappings in the typeahead buffer.
   * - When something was mapped, return map_result_retry for recursive 
mappings.
   * - When nothing mapped and typeahead has a character: return map_result_get.
***************
*** 2193,2199 ****
            && !(State == HITRETURN && (tb_c1 == CAR || tb_c1 == ' '))
            && State != ASKMORE
            && State != CONFIRM
!           && !((ctrl_x_mode_not_default() && vim_is_ctrl_x_key(tb_c1))
                    || ((compl_cont_status & CONT_LOCAL)
                        && (tb_c1 == Ctrl_N || tb_c1 == Ctrl_P))))
      {
--- 2211,2217 ----
            && !(State == HITRETURN && (tb_c1 == CAR || tb_c1 == ' '))
            && State != ASKMORE
            && State != CONFIRM
!           && !((ctrl_x_mode_not_default() && at_ctrl_x_key())
                    || ((compl_cont_status & CONT_LOCAL)
                        && (tb_c1 == Ctrl_N || tb_c1 == Ctrl_P))))
      {
*** ../vim-8.1.2190/src/version.c       2019-10-20 14:51:16.505348491 +0200
--- src/version.c       2019-10-20 15:59:52.513369902 +0200
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     2191,
  /**/

-- 
BODY:        I'm not dead!
CART DRIVER: 'Ere.  He says he's not dead.
LARGE MAN:   Yes he is.
BODY:        I'm not!
                 "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/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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/201910201401.x9KE1L8G026099%40masaka.moolenaar.net.

Raspunde prin e-mail lui