To: vim_dev@googlegroups.com Subject: Patch 7.4.2127 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2127 Problem: The short form of ":noswapfile" is ":noswap" instead of ":nos". (Kent Sibilev) Solution: Only require three characters. Add a test for the short forms. Files: src/ex_docmd.c, src/testdir/test_usercommands.vim *** ../vim-7.4.2126/src/ex_docmd.c 2016-07-28 22:08:18.678287239 +0200 --- src/ex_docmd.c 2016-07-30 19:19:46.450537517 +0200 *************** *** 1954,1960 **** #endif continue; } ! if (!checkforcmd(&ea.cmd, "noswapfile", 6)) break; cmdmod.noswapfile = TRUE; continue; --- 1954,1960 ---- #endif continue; } ! if (!checkforcmd(&ea.cmd, "noswapfile", 3)) break; cmdmod.noswapfile = TRUE; continue; *** ../vim-7.4.2126/src/testdir/test_usercommands.vim 2016-07-28 22:08:18.682287202 +0200 --- src/testdir/test_usercommands.vim 2016-07-30 19:35:38.773730883 +0200 *************** *** 8,38 **** MyCmd aboveleft MyCmd belowright MyCmd botright MyCmd browse MyCmd confirm MyCmd hide MyCmd keepalt MyCmd keepjumps MyCmd keepmarks MyCmd keeppatterns MyCmd lockmarks MyCmd noswapfile MyCmd silent MyCmd tab MyCmd topleft MyCmd verbose MyCmd vertical 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 ' . \ 'keepmarks keeppatterns lockmarks noswapfile silent tab topleft ' . \ 'verbose vertical ', g:mods) --- 8,64 ---- 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 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) *** ../vim-7.4.2126/src/version.c 2016-07-30 19:11:21.035200855 +0200 --- src/version.c 2016-07-30 19:39:09.467779435 +0200 *************** *** 765,766 **** --- 765,768 ---- { /* Add new patch number below this line */ + /**/ + 2127, /**/ -- It is illegal to take more than three sips of beer at a time while standing. [real standing law in Texas, United States of America] /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///