mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 19:06:31 +00:00
vim-patch:8.1.1491: fix skipping after exception #10164
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 vim/vim#4507)
6064073841
This commit is contained in:

committed by
Justin M. Keyes

parent
b398b1eedd
commit
3dd31b2b65
@@ -4284,7 +4284,7 @@ static int eval7(
|
||||
// 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 (evaluate && aborting()) {
|
||||
if (ret == OK) {
|
||||
tv_clear(rettv);
|
||||
}
|
||||
|
@@ -99,3 +99,12 @@ func Test_let_errmsg()
|
||||
call assert_fails('let v:errmsg = []', 'E730:')
|
||||
let v:errmsg = ''
|
||||
endfunc
|
||||
|
||||
" Test fix for issue #4507
|
||||
func Test_skip_after_throw()
|
||||
try
|
||||
throw 'something'
|
||||
let x = wincol() || &ts
|
||||
catch /something/
|
||||
endtry
|
||||
endfunc
|
||||
|
Reference in New Issue
Block a user