mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -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:
parent
6e2c2c50ba
commit
20a762987e
@ -546,6 +546,13 @@ def Test_modifier_silent_unsilent()
|
|||||||
|
|
||||||
silent EchoThere()
|
silent EchoThere()
|
||||||
assert_equal("\nthere", execute(':1messages'))
|
assert_equal("\nthere", execute(':1messages'))
|
||||||
|
|
||||||
|
try
|
||||||
|
silent eval [][0]
|
||||||
|
catch
|
||||||
|
echomsg "caught"
|
||||||
|
endtry
|
||||||
|
assert_equal("\ncaught", execute(':1messages'))
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_range_after_command_modifier()
|
def Test_range_after_command_modifier()
|
||||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2217,
|
||||||
/**/
|
/**/
|
||||||
2216,
|
2216,
|
||||||
/**/
|
/**/
|
||||||
|
@ -2286,6 +2286,13 @@ call_def_function(
|
|||||||
{
|
{
|
||||||
garray_T *trystack = &ectx.ec_trystack;
|
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)
|
if (trystack->ga_len > 0)
|
||||||
{
|
{
|
||||||
trycmd_T *trycmd = ((trycmd_T *)trystack->ga_data)
|
trycmd_T *trycmd = ((trycmd_T *)trystack->ga_data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user