]> granicus.if.org Git - vim/commitdiff
updated for version 7.2b-010 v7.2b.010
authorBram Moolenaar <Bram@vim.org>
Tue, 22 Jul 2008 16:58:47 +0000 (16:58 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 22 Jul 2008 16:58:47 +0000 (16:58 +0000)
src/getchar.c
src/version.c

index ec5ae872664647f3112127d3d484c7d115d9eb09..d4066c2124fecc916523135e0d959f1e4761322a 100644 (file)
@@ -4539,7 +4539,7 @@ makemap(fd, buf)
     buf_T      *buf;       /* buffer for local mappings or NULL */
 {
     mapblock_T *mp;
-    char_u     c1, c2;
+    char_u     c1, c2, c3;
     char_u     *p;
     char       *cmd;
     int                abbr;
@@ -4592,8 +4592,12 @@ makemap(fd, buf)
                if (*p != NUL)
                    continue;
 
+               /* It's possible to create a mapping and then ":unmap" certain
+                * modes.  We recreate this here by mapping the individual
+                * modes, which requires up to three of them. */
                c1 = NUL;
                c2 = NUL;
+               c3 = NUL;
                if (abbr)
                    cmd = "abbr";
                else
@@ -4605,9 +4609,6 @@ makemap(fd, buf)
                    case NORMAL:
                        c1 = 'n';
                        break;
-                   case VISUAL + SELECTMODE:
-                       c1 = 'v';
-                       break;
                    case VISUAL:
                        c1 = 'x';
                        break;
@@ -4617,16 +4618,45 @@ makemap(fd, buf)
                    case OP_PENDING:
                        c1 = 'o';
                        break;
-                   case NORMAL + VISUAL + SELECTMODE:
+                   case NORMAL + VISUAL:
                        c1 = 'n';
-                       c2 = 'v';
+                       c2 = 'x';
                        break;
-                   case VISUAL + SELECTMODE + OP_PENDING:
+                   case NORMAL + SELECTMODE:
+                       c1 = 'n';
+                       c2 = 's';
+                       break;
+                   case NORMAL + OP_PENDING:
+                       c1 = 'n';
+                       c2 = 'o';
+                       break;
+                   case VISUAL + SELECTMODE:
                        c1 = 'v';
+                       break;
+                   case VISUAL + OP_PENDING:
+                       c1 = 'x';
                        c2 = 'o';
                        break;
-                   case NORMAL + OP_PENDING:
+                   case SELECTMODE + OP_PENDING:
+                       c1 = 's';
+                       c2 = 'o';
+                       break;
+                   case NORMAL + VISUAL + SELECTMODE:
+                       c1 = 'n';
+                       c2 = 'v';
+                       break;
+                   case NORMAL + VISUAL + OP_PENDING:
+                       c1 = 'n';
+                       c2 = 'x';
+                       c3 = 'o';
+                       break;
+                   case NORMAL + SELECTMODE + OP_PENDING:
                        c1 = 'n';
+                       c2 = 's';
+                       c3 = 'o';
+                       break;
+                   case VISUAL + SELECTMODE + OP_PENDING:
+                       c1 = 'v';
                        c2 = 'o';
                        break;
                    case CMDLINE + INSERT:
@@ -4646,7 +4676,7 @@ makemap(fd, buf)
                        EMSG(_("E228: makemap: Illegal mode"));
                        return FAIL;
                }
-               do      /* may do this twice if c2 is set */
+               do      /* do this twice if c2 is set, 3 times with c3 */
                {
                    /* When outputting <> form, need to make sure that 'cpo'
                     * is set to the Vim default. */
@@ -4693,9 +4723,9 @@ makemap(fd, buf)
                            || put_eol(fd) < 0)
                        return FAIL;
                    c1 = c2;
-                   c2 = NUL;
-               }
-               while (c1);
+                   c2 = c3;
+                   c3 = NUL;
+               } while (c1 != NUL);
            }
        }
 
index d51c8777b10067ea4b0699383ea311042f566a94..d44cd658efaf5b2816e215c1953faf9329cba2d5 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    10,
 /**/
     9,
 /**/