]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.489 v7.3.489
authorBram Moolenaar <Bram@vim.org>
Thu, 5 Apr 2012 14:07:06 +0000 (16:07 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 5 Apr 2012 14:07:06 +0000 (16:07 +0200)
Problem:    CTRL-] in Insert mode does not expand abbreviation when used in a
            mapping. (Yichao Zhou)
Solution:   Special case using CTRL-]. (Christian Brabandt)

src/edit.c
src/getchar.c
src/version.c

index e95ddddc25580fe5aba27ab18b41bc320a59e94f..c8320a6e23b5ca3c7824578b8b503fe22ed2cf13 100644 (file)
@@ -1455,13 +1455,16 @@ normalchar:
                    Insstart_blank_vcol = get_nolist_virtcol();
            }
 
-           if (vim_iswordc(c) || !echeck_abbr(
+           /* Insert a normal character and check for abbreviations on a
+            * special character.  Let CTRL-] expand abbreviations without
+            * inserting it. */
+           if (vim_iswordc(c) || (!echeck_abbr(
 #ifdef FEAT_MBYTE
                        /* Add ABBR_OFF for characters above 0x100, this is
                         * what check_abbr() expects. */
                        (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) :
 #endif
-                       c))
+                       c) && c != Ctrl_RSB))
            {
                insert_special(c, FALSE, FALSE);
 #ifdef FEAT_RIGHTLEFT
index dc7d768476ce25b0f54781e1acbe7d3d267dc321..606d9a2c6fd63e9e364187005253418afd14159b 100644 (file)
@@ -4352,8 +4352,9 @@ check_abbr(c, ptr, col, mincol)
 
     if (typebuf.tb_no_abbr_cnt)        /* abbrev. are not recursive */
        return FALSE;
-    if ((KeyNoremap & (RM_NONE|RM_SCRIPT)) != 0)
-       /* no remapping implies no abbreviation */
+
+    /* no remapping implies no abbreviation, except for CTRL-] */
+    if ((KeyNoremap & (RM_NONE|RM_SCRIPT)) != 0 && c != Ctrl_RSB)
        return FALSE;
 
     /*
index 8bcdd3075fc4310eb6702ecd97445106ff9ac925..d012d990904ef55fce959aeedac018026b05fd70 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    489,
 /**/
     488,
 /**/