comparison src/testdir/test_vim9_cmd.vim @ 23096:b6aadb0b3a56 v8.2.2094

patch 8.2.2094: when an expression fails getting next command may be wrong Commit: https://github.com/vim/vim/commit/d0fe620cbbf5f5e00446efa89893036265c5c302 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 5 17:11:12 2020 +0100 patch 8.2.2094: when an expression fails getting next command may be wrong Problem: When an expression fails getting the next command may be wrong. Solution: Do not check for a next command after :eval fails. (closes https://github.com/vim/vim/issues/7415)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Dec 2020 17:15:03 +0100
parents 4b398a229b0b
children 6aa8ddf7a3fa
comparison
equal deleted inserted replaced
23095:211188403293 23096:b6aadb0b3a56
556 enddef 556 enddef
557 eval range(from, to) 557 eval range(from, to)
558 ->Increment() 558 ->Increment()
559 assert_equal(111 + 3 + 4 + 5, g:val) 559 assert_equal(111 + 3 + 4 + 5, g:val)
560 unlet g:val 560 unlet g:val
561
562 var lines =<< trim END
563 vim9script
564 g:caught = 'no'
565 try
566 eval 123 || 0
567 catch
568 g:caught = 'yes'
569 endtry
570 assert_equal('yes', g:caught)
571 unlet g:caught
572 END
573 CheckScriptSuccess(lines)
561 enddef 574 enddef
562 575
563 def Test_map_command() 576 def Test_map_command()
564 var lines =<< trim END 577 var lines =<< trim END
565 nnoremap <F3> :echo 'hit F3 #'<CR> 578 nnoremap <F3> :echo 'hit F3 #'<CR>