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)
diff --git a/src/vim9execute.c b/src/vim9execute.c
index abf88b1..3302787 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -2869,6 +2869,10 @@
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;