vim-patch:7.4.1728

patch 7.4.1728
Problem:    The help for functions require a space after the "(".
Solution:   Make CTRL-] on a function name ignore the arguments. (Hirohito
            Higashi)

81edd171a9
This commit is contained in:
Michael Ennen 2016-05-09 23:37:51 -07:00 committed by James McCoy
parent 850f91c51c
commit c3c409c70f
4 changed files with 281 additions and 265 deletions

View File

@ -1784,8 +1784,7 @@ append( {lnum}, {string}) Number append {string} below line {lnum}
append({lnum}, {list}) Number append lines {list} below line {lnum} append({lnum}, {list}) Number append lines {list} below line {lnum}
argc() Number number of files in the argument list argc() Number number of files in the argument list
argidx() Number current index in the argument list argidx() Number current index in the argument list
arglistid( [{winnr} [, {tabnr}]]) arglistid([{winnr} [, {tabnr}]]) Number argument list id
Number argument list id
argv({nr}) String {nr} entry of the argument list argv({nr}) String {nr} entry of the argument list
argv() List the argument list argv() List the argument list
assert_equal({exp}, {act} [, {msg}]) none assert {exp} equals {act} assert_equal({exp}, {act} [, {msg}]) none assert {exp} equals {act}

View File

@ -4487,6 +4487,12 @@ int find_help_tags(char_u *arg, int *num_matches, char_u ***matches, int keep_la
*d++ = *s; *d++ = *s;
// If tag contains "({" or "([", tag terminates at the "(".
// This is for help on functions, e.g.: abs({expr}).
if (*s == '(' && (s[1] == '{' || s[1] =='[')) {
break;
}
/* /*
* If tag starts with ', toss everything after a second '. Fixes * If tag starts with ', toss everything after a second '. Fixes
* CTRL-] on 'option'. (would include the trailing '.'). * CTRL-] on 'option'. (would include the trailing '.').

View File

@ -27,4 +27,14 @@ func Test_help_tagjump()
call assert_equal("help", &filetype) call assert_equal("help", &filetype)
call assert_true(getline('.') =~ "\\*'buflisted'\\*") call assert_true(getline('.') =~ "\\*'buflisted'\\*")
helpclose helpclose
exec "help! abs({expr})"
call assert_equal("help", &filetype)
call assert_true(getline('.') =~ '\*abs()\*')
helpclose
exec "help! arglistid([{winnr})"
call assert_equal("help", &filetype)
call assert_true(getline('.') =~ '\*arglistid()\*')
helpclose
endfunc endfunc

View File

@ -76,6 +76,7 @@ static int included_patches[] = {
1757, 1757,
1755, 1755,
1753, 1753,
1728,
1654, 1654,
1652, 1652,
1643, 1643,