diff options
author | Michael Ennen <mike.ennen@gmail.com> | 2016-05-09 23:37:51 -0700 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-05-17 00:04:40 -0400 |
commit | c3c409c70f46498e2cb549905cacfa3cf49c1383 (patch) | |
tree | 4ac1899b3a71ec93700f40c45d48475101d6692f /src | |
parent | 850f91c51c7f4cd852e713ee1802bc9ab170d5cb (diff) | |
download | rneovim-c3c409c70f46498e2cb549905cacfa3cf49c1383.tar.gz rneovim-c3c409c70f46498e2cb549905cacfa3cf49c1383.tar.bz2 rneovim-c3c409c70f46498e2cb549905cacfa3cf49c1383.zip |
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)
https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_cmds.c | 6 | ||||
-rw-r--r-- | src/nvim/testdir/test_help_tagjump.vim | 10 | ||||
-rw-r--r-- | src/nvim/version.c | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index b87e02b51a..415d6ee460 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -4487,6 +4487,12 @@ int find_help_tags(char_u *arg, int *num_matches, char_u ***matches, int keep_la *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 * CTRL-] on 'option'. (would include the trailing '.'). diff --git a/src/nvim/testdir/test_help_tagjump.vim b/src/nvim/testdir/test_help_tagjump.vim index e09c27b5cb..9f9207d27d 100644 --- a/src/nvim/testdir/test_help_tagjump.vim +++ b/src/nvim/testdir/test_help_tagjump.vim @@ -27,4 +27,14 @@ func Test_help_tagjump() call assert_equal("help", &filetype) call assert_true(getline('.') =~ "\\*'buflisted'\\*") 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 diff --git a/src/nvim/version.c b/src/nvim/version.c index db3c896a74..7f646b760d 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -76,6 +76,7 @@ static int included_patches[] = { 1757, 1755, 1753, + 1728, 1654, 1652, 1643, |