0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.1928: Vim9: "silent!" not effective when list index is wrong

Problem:    Vim9: "silent!" not effective when list index is wrong.
Solution:   Ignore list indes failure when emsg_silent is set. (closes #7232)
This commit is contained in:
Bram Moolenaar
2020-10-30 21:49:40 +01:00
parent d66960bf57
commit cd030c4b60
3 changed files with 23 additions and 1 deletions

View File

@@ -2869,6 +2869,10 @@ func_return:
continue;
on_error:
// If "emsg_silent" is set then ignore the error.
if (did_emsg == did_emsg_before && emsg_silent)
continue;
// If we are not inside a try-catch started here, abort execution.
if (trylevel <= trylevel_at_start)
goto failed;