To: vim_dev@googlegroups.com Subject: Patch 8.1.1491 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1491 Problem: When skipping over code after an exception was thrown expression evaluation is aborted after a function call. (Ingo Karkat) Solution: Do not fail if not executing the expression. (closes #4507) Files: src/eval.c, src/testdir/test_eval_stuff.vim *** ../vim-8.1.1490/src/eval.c 2019-06-06 19:03:14.388227807 +0200 --- src/eval.c 2019-06-07 23:11:55.984763093 +0200 *************** *** 4592,4598 **** /* Stop the expression evaluation when immediately * aborting on error, or when an interrupt occurred or * an exception was thrown but not caught. */ ! if (aborting()) { if (ret == OK) clear_tv(rettv); --- 4592,4598 ---- /* Stop the expression evaluation when immediately * aborting on error, or when an interrupt occurred or * an exception was thrown but not caught. */ ! if (evaluate && aborting()) { if (ret == OK) clear_tv(rettv); *** ../vim-8.1.1490/src/testdir/test_eval_stuff.vim 2019-04-20 21:54:04.180499034 +0200 --- src/testdir/test_eval_stuff.vim 2019-06-07 23:11:01.141133032 +0200 *************** *** 178,180 **** --- 178,189 ---- call assert_fails('source Xversionscript', 'E999:') call delete('Xversionscript') endfunc + + " Test fix for issue #4507 + func Test_skip_after_throw() + try + throw 'something' + let x = wincol() || &ts + catch /something/ + endtry + endfunc *** ../vim-8.1.1490/src/version.c 2019-06-07 22:40:21.085369044 +0200 --- src/version.c 2019-06-07 23:15:10.435476898 +0200 *************** *** 769,770 **** --- 769,772 ---- { /* Add new patch number below this line */ + /**/ + 1491, /**/ -- hundred-and-one symptoms of being an internet addict: 118. You are on a first-name basis with your ISP's staff. /// 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 ///