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

patch 7.4.1585

Problem:    Partial is not recognized everywhere.
Solution:   Check for partial in trans_function_name(). (Yasuhiro Matsumoto)
            Add a test.
This commit is contained in:
Bram Moolenaar
2016-03-17 20:50:47 +01:00
parent 0e0b3dd335
commit d22a18928e
3 changed files with 20 additions and 0 deletions

View File

@@ -23893,6 +23893,12 @@ trans_function_name(
name = vim_strsave(lv.ll_tv->vval.v_string);
*pp = end;
}
else if (lv.ll_tv->v_type == VAR_PARTIAL
&& lv.ll_tv->vval.v_partial != NULL)
{
name = vim_strsave(lv.ll_tv->vval.v_partial->pt_name);
*pp = end;
}
else
{
if (!skip && !(flags & TFN_QUIET) && (fdp == NULL

View File

@@ -106,3 +106,15 @@ func Test_script_function_in_dict()
let B = s:obj2.clear
call assert_equal('bar', B())
endfunc
func Test_partial_exists()
let F = function('MyFunc')
call assert_true(exists('*F'))
let lF = [F]
call assert_true(exists('*lF[0]'))
let F = function('MyFunc', ['arg'])
call assert_true(exists('*F'))
let lF = [F]
call assert_true(exists('*lF[0]'))
endfunc

View File

@@ -748,6 +748,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1585,
/**/
1584,
/**/