diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/nvim/eval.c | 1 | ||||
| -rw-r--r-- | src/nvim/testdir/test_partial.vim | 14 | ||||
| -rw-r--r-- | src/nvim/version.c | 2 | 
3 files changed, 16 insertions, 1 deletions
| diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 57c1c8e210..fc0b2ee23d 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -18340,6 +18340,7 @@ handle_subscript (      // Turn "dict.Func" into a partial for "Func" with "dict".      if (pt != NULL) { +      pt->pt_refcount = 1;        pt->pt_dict = selfdict;        selfdict = NULL;        pt->pt_name = rettv->vval.v_string; diff --git a/src/nvim/testdir/test_partial.vim b/src/nvim/testdir/test_partial.vim index caae1a8cb1..f6f6b87a29 100644 --- a/src/nvim/testdir/test_partial.vim +++ b/src/nvim/testdir/test_partial.vim @@ -67,3 +67,17 @@ func Test_partial_implicit()    call assert_fails('call function(dict.MyFunc, ["bbb"], dict)', 'E924:')  endfunc + +fun InnerCall(funcref) +  return a:funcref +endfu + +fun OuterCall() +  let opt = { 'func' : function('sin') } +  call InnerCall(opt.func) +endfu + +func Test_function_in_dict() +  call OuterCall() +endfunc + diff --git a/src/nvim/version.c b/src/nvim/version.c index 4de8296ccd..9964f92132 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -862,7 +862,7 @@ static int included_patches[] = {    // 1583 NA    // 1582,    // 1581, -  // 1580, +  1580,    // 1579 NA    1578,    1577, | 
