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

patch 8.2.2217: Vim9: command modifiers not restored in catch block

Problem:    Vim9: command modifiers not restored in catch block.
Solution:   Restore command modifiers. (closes #7542)
This commit is contained in:
Bram Moolenaar
2020-12-25 19:47:24 +01:00
parent 6e2c2c50ba
commit 20a762987e
3 changed files with 16 additions and 0 deletions

View File

@@ -2286,6 +2286,13 @@ call_def_function(
{
garray_T *trystack = &ectx.ec_trystack;
if (restore_cmdmod)
{
cmdmod.cmod_filter_regmatch.regprog = NULL;
undo_cmdmod(&cmdmod);
cmdmod = save_cmdmod;
restore_cmdmod = FALSE;
}
if (trystack->ga_len > 0)
{
trycmd_T *trycmd = ((trycmd_T *)trystack->ga_data)