From 5cf0c99755581f789973a4fa4bb3d95a61a01341 Mon Sep 17 00:00:00 2001 From: Michael Ennen Date: Wed, 26 Oct 2016 12:42:15 -0700 Subject: vim-patch:7.4.1581 Problem: Using ":call dict.func()" where the function is a partial does not work. Using "dict.func()" where the function does not take a Dictionary does not work. Solution: Handle partial properly in ":call". (Yasuhiro Matsumoto) https://github.com/vim/vim/commit/65639032bb7b17996cd255d1508a1df4ad528a1f --- src/nvim/testdir/test_partial.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_partial.vim b/src/nvim/testdir/test_partial.vim index f6f6b87a29..cb853f9335 100644 --- a/src/nvim/testdir/test_partial.vim +++ b/src/nvim/testdir/test_partial.vim @@ -16,6 +16,8 @@ endfunc func Test_partial_args() let Cb = function('MyFunc', ["foo", "bar"]) + + call Cb("zzz") call assert_equal("foo/bar/xxx", Cb("xxx")) call assert_equal("foo/bar/yyy", call(Cb, ["yyy"])) @@ -48,6 +50,9 @@ func Test_partial_dict() let Cb = function('MyDictFunc', dict) call assert_equal("hello/xxx/yyy", Cb("xxx", "yyy")) call assert_fails('Cb("fff")', 'E492:') + + let dict = {"tr": function('tr', ['hello', 'h', 'H'])} + call assert_equal("Hello", dict.tr()) endfunc func Test_partial_implicit() -- cgit