To: vim-dev@vim.org Subject: Patch 6.1.134 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.134 Problem: An error for a trailing argument of ":match" should not be given after ":if 0". (Servatius Brandt) Solution: Only do the check when executing commands. Files: src/ex_docmd.c *** ../vim61.133/src/ex_docmd.c Sun Jul 21 20:51:28 2002 --- src/ex_docmd.c Thu Jul 18 20:44:49 2002 *************** *** 8915,8932 **** p = skipwhite(p); if (*p == NUL) { EMSG2(_(e_invarg2), eap->arg); return; } end = skip_regexp(p + 1, *p, TRUE, NULL); - if (*end != NUL && !ends_excmd(*skipwhite(end + 1))) - { - eap->errmsg = e_trailing; - return; - } - if (!eap->skip) { c = *end; *end = NUL; curwin->w_match.regprog = vim_regcomp(p + 1, TRUE); --- 8922,8940 ---- p = skipwhite(p); if (*p == NUL) { + /* There must be two arguments. */ EMSG2(_(e_invarg2), eap->arg); return; } end = skip_regexp(p + 1, *p, TRUE, NULL); if (!eap->skip) { + if (*end != NUL && !ends_excmd(*skipwhite(end + 1))) + { + eap->errmsg = e_trailing; + return; + } + c = *end; *end = NUL; curwin->w_match.regprog = vim_regcomp(p + 1, TRUE); *** ../vim61.133/src/version.c Sun Jul 21 20:58:30 2002 --- src/version.c Sun Jul 21 21:00:05 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 134, /**/ -- hundred-and-one symptoms of being an internet addict: 15. Your heart races faster and beats irregularly each time you see a new WWW site address in print or on TV, even though you've never had heart problems before. /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///