0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.0532: cannot use simplify() as a method

Problem:    Cannot use simplify() as a method.
Solution:   Add FEARG_1. (closes #5996)
This commit is contained in:
Bram Moolenaar
2020-04-08 20:03:52 +02:00
parent 476a613135
commit 7035fd9d90
4 changed files with 6 additions and 2 deletions

View File

@@ -9024,6 +9024,8 @@ simplify({filename}) *simplify()*
directory. In order to resolve all the involved symbolic directory. In order to resolve all the involved symbolic
links before simplifying the path name, use |resolve()|. links before simplifying the path name, use |resolve()|.
Can also be used as a |method|: >
GetName()->simplify()
sin({expr}) *sin()* sin({expr}) *sin()*
Return the sine of {expr}, measured in radians, as a |Float|. Return the sine of {expr}, measured in radians, as a |Float|.

View File

@@ -837,7 +837,7 @@ static funcentry_T global_functions[] =
{"sign_undefine", 0, 1, FEARG_1, ret_number, SIGN_FUNC(f_sign_undefine)}, {"sign_undefine", 0, 1, FEARG_1, ret_number, SIGN_FUNC(f_sign_undefine)},
{"sign_unplace", 1, 2, FEARG_1, ret_number, SIGN_FUNC(f_sign_unplace)}, {"sign_unplace", 1, 2, FEARG_1, ret_number, SIGN_FUNC(f_sign_unplace)},
{"sign_unplacelist", 1, 2, FEARG_1, ret_list_number, SIGN_FUNC(f_sign_unplacelist)}, {"sign_unplacelist", 1, 2, FEARG_1, ret_list_number, SIGN_FUNC(f_sign_unplacelist)},
{"simplify", 1, 1, 0, ret_string, f_simplify}, {"simplify", 1, 1, FEARG_1, ret_string, f_simplify},
{"sin", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_sin)}, {"sin", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_sin)},
{"sinh", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_sinh)}, {"sinh", 1, 1, FEARG_1, ret_float, FLOAT_FUNC(f_sinh)},
{"sort", 1, 3, FEARG_1, ret_list_any, f_sort}, {"sort", 1, 3, FEARG_1, ret_list_any, f_sort},

View File

@@ -450,7 +450,7 @@ func Test_simplify()
call assert_equal('/', simplify('/.')) call assert_equal('/', simplify('/.'))
call assert_equal('/', simplify('/..')) call assert_equal('/', simplify('/..'))
call assert_equal('/...', simplify('/...')) call assert_equal('/...', simplify('/...'))
call assert_equal('./dir/file', simplify('./dir/file')) call assert_equal('./dir/file', './dir/file'->simplify())
call assert_equal('./dir/file', simplify('.///dir//file')) call assert_equal('./dir/file', simplify('.///dir//file'))
call assert_equal('./dir/file', simplify('./dir/./file')) call assert_equal('./dir/file', simplify('./dir/./file'))
call assert_equal('./file', simplify('./dir/../file')) call assert_equal('./file', simplify('./dir/../file'))

View File

@@ -738,6 +738,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 */
/**/
532,
/**/ /**/
531, 531,
/**/ /**/