aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKillTheMule <KillTheMule@users.noreply.github.com>2016-08-25 21:05:18 +0200
committerKillTheMule <KillTheMule@users.noreply.github.com>2016-08-26 21:50:18 +0200
commit86a95c5117c9f2bb804f4a972053f786c10eb7ea (patch)
treeb64fd250869adc8f4222991ade4db8b4011b7e53 /src
parent41a64586c7d16bd8bdec533717daeea3fa2f3107 (diff)
downloadrneovim-86a95c5117c9f2bb804f4a972053f786c10eb7ea.tar.gz
rneovim-86a95c5117c9f2bb804f4a972053f786c10eb7ea.tar.bz2
rneovim-86a95c5117c9f2bb804f4a972053f786c10eb7ea.zip
vim-patch:7.4.1952
Problem: Cscope interface does not support finding assignments. Solution: Add the "a" command. (ppettina, closes vim/vim#882) https://github.com/vim/vim/commit/b12e7ef956e0b0344778b7ef93d41f4b4ed2a670 All changes applied manually.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/if_cscope.c17
-rw-r--r--src/nvim/version.c2
2 files changed, 13 insertions, 6 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c
index f2432dd71d..67f096fa76 100644
--- a/src/nvim/if_cscope.c
+++ b/src/nvim/if_cscope.c
@@ -52,7 +52,7 @@ static cscmd_T cs_cmds[] =
{ "add", cs_add,
N_("Add a new database"), "add file|dir [pre-path] [flags]", 0 },
{ "find", cs_find,
- N_("Query for a pattern"), "find c|d|e|f|g|i|s|t name", 1 },
+ N_("Query for a pattern"), "find c|d|e|f|g|i|s|t|a name", 1 },
{ "help", cs_help,
N_("Show this message"), "help", 0 },
{ "kill", cs_kill,
@@ -105,12 +105,12 @@ char_u *get_cscope_name(expand_T *xp, int idx)
{
const char *query_type[] =
{
- "c", "d", "e", "f", "g", "i", "s", "t", NULL
+ "c", "d", "e", "f", "g", "i", "s", "t", "a", NULL
};
/* Complete with query type of ":cscope find {query_type}".
- * {query_type} can be letters (c, d, ... t) or numbers (0, 1,
- * ..., 8) but only complete with letters, since numbers are
+ * {query_type} can be letters (c, d, ... a) or numbers (0, 1,
+ * ..., 9) but only complete with letters, since numbers are
* redundant. */
return (char_u *)query_type[idx];
}
@@ -674,6 +674,9 @@ static char *cs_create_cmd(char *csoption, char *pattern)
case '8': case 'i':
search = 8;
break;
+ case '9': case 'a':
+ search = 9;
+ break;
default:
(void)EMSG(_("E561: unknown cscope search type"));
cs_usage_msg(Find);
@@ -970,6 +973,9 @@ static int cs_find_common(char *opt, char *pat, int forceit, int verbose,
case '8':
cmdletter = 'i';
break;
+ case '9':
+ cmdletter = 'a';
+ break;
default:
cmdletter = opt[0];
}
@@ -1133,7 +1139,8 @@ static int cs_help(exarg_T *eap)
" g: Find this definition\n"
" i: Find files #including this file\n"
" s: Find this C symbol\n"
- " t: Find this text string\n"));
+ " t: Find this text string\n"
+ " a: Find assignments to this symbol\n"));
cmdp++;
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 978bc2e228..700b35a44d 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -324,7 +324,7 @@ static int included_patches[] = {
// 1955,
// 1954,
// 1953,
- // 1952,
+ 1952,
// 1951 NA
// 1950,
// 1949,