To: vim_dev@googlegroups.com Subject: Patch 8.2.0424 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0424 Problem: Checking for wrong return value. (Tom) Solution: Invert the check and fix the test. Files: src/vim9execute.c, src/testdir/test_vim9_script.vim *** ../vim-8.2.0423/src/vim9execute.c 2020-03-20 18:39:42.981273170 +0100 --- src/vim9execute.c 2020-03-22 13:37:31.567976759 +0100 *************** *** 487,493 **** { // Turn CTRL-C into an exception. got_int = FALSE; ! if (throw_exception("Vim:Interrupt", ET_INTERRUPT, NULL) != FAIL) goto failed; did_throw = TRUE; } --- 487,493 ---- { // Turn CTRL-C into an exception. got_int = FALSE; ! if (throw_exception("Vim:Interrupt", ET_INTERRUPT, NULL) == FAIL) goto failed; did_throw = TRUE; } *** ../vim-8.2.0423/src/testdir/test_vim9_script.vim 2020-03-20 20:48:45.563983163 +0100 --- src/testdir/test_vim9_script.vim 2020-03-22 13:41:22.183144448 +0100 *************** *** 943,955 **** enddef def Test_interrupt_loop() let x = 0 ! while 1 ! x += 1 ! if x == 100 ! feedkeys("\", 'Lt') ! endif ! endwhile enddef def Test_substitute_cmd() --- 943,962 ---- enddef def Test_interrupt_loop() + let caught = false let x = 0 ! try ! while 1 ! x += 1 ! if x == 100 ! feedkeys("\", 'Lt') ! endif ! endwhile ! catch ! caught = true ! assert_equal(100, x) ! endtry ! assert_true(caught, 'should have caught an exception') enddef def Test_substitute_cmd() *** ../vim-8.2.0423/src/version.c 2020-03-21 15:17:16.820725431 +0100 --- src/version.c 2020-03-22 13:39:07.991630621 +0100 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 424, /**/ -- Apologies for taking up the bandwidth with the apology. Anything else I can apologise for ...... er no can't think of anything, sorry about that. Andy Hunt (Member of British Olympic Apology Squad) /// 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 ///