mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.1585
Problem: Partial is not recognized everywhere.
Solution: Check for partial in trans_function_name(). (Yasuhiro Matsumoto)
Add a test.
d22a18928e
This commit is contained in:
parent
e2258598ca
commit
27b2fb944a
@ -20321,6 +20321,10 @@ trans_function_name (
|
||||
if (lv.ll_tv->v_type == VAR_FUNC && lv.ll_tv->vval.v_string != NULL) {
|
||||
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
|
||||
|| lv.ll_dict == NULL
|
||||
|
@ -105,3 +105,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
|
||||
|
@ -857,7 +857,7 @@ static int included_patches[] = {
|
||||
1588,
|
||||
// 1587 NA
|
||||
// 1586,
|
||||
// 1585,
|
||||
1585,
|
||||
// 1584 NA
|
||||
// 1583 NA
|
||||
1582,
|
||||
|
Loading…
Reference in New Issue
Block a user