File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2142,6 +2142,24 @@ typedef enum {
21422142 map_result_nomatch // no matching mapping, get char
21432143} map_result_T ;
21442144
2145+ /*
2146+ * Check if the bytes at the start of the typeahead buffer are a character used
2147+ * in CTRL-X mode. This includes the form with a CTRL modifier.
2148+ */
2149+ static int
2150+ at_ctrl_x_key (void )
2151+ {
2152+ char_u * p = typebuf .tb_buf + typebuf .tb_off ;
2153+ int c = * p ;
2154+
2155+ if (typebuf .tb_len > 3
2156+ && c == K_SPECIAL
2157+ && p [1 ] == KS_MODIFIER
2158+ && (p [2 ] & MOD_MASK_CTRL ))
2159+ c = p [3 ] & 0x1f ;
2160+ return vim_is_ctrl_x_key (c );
2161+ }
2162+
21452163/*
21462164 * Handle mappings in the typeahead buffer.
21472165 * - When something was mapped, return map_result_retry for recursive mappings.
@@ -2193,7 +2211,7 @@ handle_mapping(
21932211 && !(State == HITRETURN && (tb_c1 == CAR || tb_c1 == ' ' ))
21942212 && State != ASKMORE
21952213 && State != CONFIRM
2196- && !((ctrl_x_mode_not_default () && vim_is_ctrl_x_key ( tb_c1 ))
2214+ && !((ctrl_x_mode_not_default () && at_ctrl_x_key ( ))
21972215 || ((compl_cont_status & CONT_LOCAL )
21982216 && (tb_c1 == Ctrl_N || tb_c1 == Ctrl_P ))))
21992217 {
Original file line number Diff line number Diff line change @@ -741,6 +741,8 @@ static char *(features[]) =
741741
742742static int included_patches [] =
743743{ /* Add new patch number below this line */
744+ /**/
745+ 2191 ,
744746/**/
745747 2190 ,
746748/**/
You can’t perform that action at this time.
0 commit comments