]> granicus.if.org Git - vim/commitdiff
patch 7.4.2127 v7.4.2127
authorBram Moolenaar <Bram@vim.org>
Sat, 30 Jul 2016 17:39:29 +0000 (19:39 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 30 Jul 2016 17:39:29 +0000 (19:39 +0200)
Problem:    The short form of ":noswapfile" is ":noswap" instead of ":now".
            (Kent Sibilev)
Solution:   Only require three characters.  Add a test for the short forms.

src/ex_docmd.c
src/testdir/test_usercommands.vim
src/version.c

index 34c9955c1625f83e1bce208ec9d6745579d3d867..1a7fbfabb7c169e0fe437fe63d64e52c6e6ad805 100644 (file)
@@ -1954,7 +1954,7 @@ do_one_cmd(
 #endif
                            continue;
                        }
-                       if (!checkforcmd(&ea.cmd, "noswapfile", 6))
+                       if (!checkforcmd(&ea.cmd, "noswapfile", 3))
                            break;
                        cmdmod.noswapfile = TRUE;
                        continue;
index e6c31962dd7a7df0278d9f183e52db85a3659a33..1f92adab7363f78e2c5c4e3429385be807a4fd1a 100644 (file)
@@ -8,31 +8,57 @@ function Test_cmdmods()
 
   MyCmd
   aboveleft MyCmd
+  abo MyCmd
   belowright MyCmd
+  bel MyCmd
   botright MyCmd
+  bo MyCmd
   browse MyCmd
+  bro MyCmd
   confirm MyCmd
+  conf MyCmd
   hide MyCmd
+  hid MyCmd
   keepalt MyCmd
+  keepa MyCmd
   keepjumps MyCmd
+  keepj MyCmd
   keepmarks MyCmd
+  kee MyCmd
   keeppatterns MyCmd
+  keepp MyCmd
+  leftabove MyCmd  " results in :aboveleft
+  lefta MyCmd
   lockmarks MyCmd
+  loc MyCmd
+  " noautocmd MyCmd
   noswapfile MyCmd
+  nos MyCmd
+  rightbelow MyCmd " results in :belowright
+  rightb MyCmd
+  " sandbox MyCmd
   silent MyCmd
+  sil MyCmd
   tab MyCmd
   topleft MyCmd
+  to MyCmd
+  " unsilent MyCmd
   verbose MyCmd
+  verb MyCmd
   vertical MyCmd
+  vert MyCmd
 
   aboveleft belowright botright browse confirm hide keepalt keepjumps
              \ keepmarks keeppatterns lockmarks noswapfile silent tab
              \ topleft verbose vertical MyCmd
 
-  call assert_equal(' aboveleft belowright botright browse confirm ' .
-      \ 'hide keepalt keepjumps keepmarks keeppatterns lockmarks ' .
-      \ 'noswapfile silent tab topleft verbose vertical aboveleft ' .
-      \ 'belowright botright browse confirm hide keepalt keepjumps ' .
+  call assert_equal(' aboveleft aboveleft belowright belowright botright ' .
+      \ 'botright browse browse confirm confirm hide hide ' .
+      \ 'keepalt keepalt keepjumps keepjumps keepmarks keepmarks ' .
+      \ 'keeppatterns keeppatterns aboveleft aboveleft lockmarks lockmarks noswapfile ' .
+      \ 'noswapfile belowright belowright silent silent tab topleft topleft verbose verbose ' .
+      \ 'vertical vertical ' .
+      \ 'aboveleft belowright botright browse confirm hide keepalt keepjumps ' .
       \ 'keepmarks keeppatterns lockmarks noswapfile silent tab topleft ' .
       \ 'verbose vertical ', g:mods)
 
index f456729f526b03aa001e58f6b1166ccc949a5706..513712198a1a85992a6e16a5204df879fcbbd50c 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2127,
 /**/
     2126,
 /**/