]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.0529: silent! causes following try/catch to not work v9.1.0529
authorLemonBoy <thatlemon@gmail.com>
Thu, 4 Jul 2024 17:23:16 +0000 (19:23 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 4 Jul 2024 17:23:16 +0000 (19:23 +0200)
commit749ba0f6d922b3f6b54a66543c214479492b5a0e
tree52cb115b2cc1a254306bf14e64cc20784a6b1fab
parent11d599257310bb95a7d1a3537345ae26f36c6210
patch 9.1.0529: silent! causes following try/catch to not work

Problem:  silent! causes following try/catch to not work
          (Malcolm Rowe)
Solution: consider emsg_silent in handle_did_throw() and do not abort
          evaluation flow for :silent! (LemonBoy)

The silent! flag causes the evaluation not to be aborted in case of
uncaught exceptions, adjust handle_did_throw to take this detail into
account.

Fixes the long-standing todo.txt item:
```
Problem that a previous silent ":throw" causes a following try/catch not
to work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
Also see #8487 for an example.
```

fixes: #538
closes: #15128

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/todo.txt
src/ex_docmd.c
src/testdir/test_vimscript.vim
src/version.c