aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorMichael Ennen <mike.ennen@gmail.com>2016-05-09 23:37:51 -0700
committerJames McCoy <jamessan@jamessan.com>2016-05-17 00:04:40 -0400
commit10c819d453ec94477acfc0f6a52166b090482bbb (patch)
treecc7aca11f7bdc23302f289381640ee01a419f076 /src/nvim/ex_cmds.c
parent39af303600fb1ccd32145b5a95f44a9e4cda6ee9 (diff)
downloadrneovim-10c819d453ec94477acfc0f6a52166b090482bbb.tar.gz
rneovim-10c819d453ec94477acfc0f6a52166b090482bbb.tar.bz2
rneovim-10c819d453ec94477acfc0f6a52166b090482bbb.zip
vim-patch:7.4.1568
patch 7.4.1568 Problem: Using CTRL-] in help on option in parentheses doesn't work. Solution: Skip the "(" in "('". (Hirohito Higashi) https://github.com/vim/vim/commit/00f9e0dbbd3472db217d56639fad9346b9eb3b82
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index e8314e02e0..b87e02b51a 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -4413,17 +4413,20 @@ int find_help_tags(char_u *arg, int *num_matches, char_u ***matches, int keep_la
|| (arg[0] == '\\' && arg[1] == '{'))
*d++ = '\\';
- for (s = arg; *s; ++s) {
- /*
- * Replace "|" with "bar" and '"' with "quote" to match the name of
- * the tags for these commands.
- * Replace "*" with ".*" and "?" with "." to match command line
- * completion.
- * Insert a backslash before '~', '$' and '.' to avoid their
- * special meaning.
- */
- if (d - IObuff > IOSIZE - 10) /* getting too long!? */
+ // If tag starts with "('", skip the "(". Fixes CTRL-] on ('option'.
+ if (*arg == '(' && arg[1] == '\'') {
+ arg++;
+ }
+ for (s = arg; *s; s++) {
+ // Replace "|" with "bar" and '"' with "quote" to match the name of
+ // the tags for these commands.
+ // Replace "*" with ".*" and "?" with "." to match command line
+ // completion.
+ // Insert a backslash before '~', '$' and '.' to avoid their
+ // special meaning.
+ if (d - IObuff > IOSIZE - 10) { // getting too long!?
break;
+ }
switch (*s) {
case '|': STRCPY(d, "bar");
d += 3;