To: vim-dev@vim.org Subject: Patch 6.2.046 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.046 Problem: When evaluating an argument of a function throws an exception the function is still called. (Hari Krishna Dara) Solution: Don't call the function when an exception was thrown. Files: src/eval.c *** ../vim-6.2.045/src/eval.c Fri Jul 25 22:43:59 2003 --- src/eval.c Sat Jul 26 18:35:19 2003 *************** *** 2957,2967 **** else ret = FAIL; ! if (ret == OK) ! ret = call_func(name, len, retvar, argcount, argvars, firstline, lastline, doesrange, evaluate); ! else if (!aborting()) ! EMSG2(_("E116: Invalid arguments for function %s"), name); while (--argcount >= 0) clear_var(&argvars[argcount]); --- 2975,2988 ---- else ret = FAIL; ! if (!aborting()) ! { ! if (ret == OK) ! ret = call_func(name, len, retvar, argcount, argvars, firstline, lastline, doesrange, evaluate); ! else ! EMSG2(_("E116: Invalid arguments for function %s"), name); ! } while (--argcount >= 0) clear_var(&argvars[argcount]); *** ../vim-6.2.045/src/version.c Sun Jul 27 14:22:19 2003 --- src/version.c Sun Jul 27 14:25:19 2003 *************** *** 632,633 **** --- 632,635 ---- { /* Add new patch number below this line */ + /**/ + 46, /**/ -- Hacker: Someone skilled in computer programming (good guy). Cracker: A hacker that uses his skills to crack software (bad guy). /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///