summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-04-14 13:51:37 +0200
committerBram Moolenaar <Bram@vim.org>2016-04-14 13:51:37 +0200
commit81edd171a9465cf99cede4fa4a7b7bca3d538b0f (patch)
treeb9276dfffad0c48e92fa949a6d88770f630ea69f /src
parentebf7dfa6f121c82f97d2adca3d45fbaba9ad8f7e (diff)
patch 7.4.1728v7.4.1728
Problem: The help for functions require a space after the "(". Solution: Make CTRL-] on a function name ignore the arguments. (Hirohito Higashi)
Diffstat (limited to 'src')
-rw-r--r--src/ex_cmds.c7
-rw-r--r--src/testdir/test_help_tagjump.vim10
-rw-r--r--src/version.c2
3 files changed, 19 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index daac3ae8d6..d83dc405c7 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -6204,6 +6204,13 @@ find_help_tags(
*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/testdir/test_help_tagjump.vim b/src/testdir/test_help_tagjump.vim
index d1e9ad422b..f486583bc8 100644
--- a/src/testdir/test_help_tagjump.vim
+++ b/src/testdir/test_help_tagjump.vim
@@ -15,4 +15,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/version.c b/src/version.c
index 6c94bc64b2..a8556a838c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1728,
+/**/
1727,
/**/
1726,