mirror of
https://github.com/vim/vim.git
synced 2025-10-08 06:04:08 -04:00
patch 7.4.1952
Problem: Cscope interface does not support finding assignments. Solution: Add the "a" command. (ppettina, closes #882)
This commit is contained in:
@@ -70,7 +70,7 @@ static cscmd_T cs_cmds[] =
|
|||||||
{ "add", cs_add,
|
{ "add", cs_add,
|
||||||
N_("Add a new database"), "add file|dir [pre-path] [flags]", 0 },
|
N_("Add a new database"), "add file|dir [pre-path] [flags]", 0 },
|
||||||
{ "find", cs_find,
|
{ "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,
|
{ "help", cs_help,
|
||||||
N_("Show this message"), "help", 0 },
|
N_("Show this message"), "help", 0 },
|
||||||
{ "kill", cs_kill,
|
{ "kill", cs_kill,
|
||||||
@@ -126,12 +126,12 @@ get_cscope_name(expand_T *xp UNUSED, int idx)
|
|||||||
{
|
{
|
||||||
const char *query_type[] =
|
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}".
|
/* Complete with query type of ":cscope find {query_type}".
|
||||||
* {query_type} can be letters (c, d, ... t) or numbers (0, 1,
|
* {query_type} can be letters (c, d, ... a) or numbers (0, 1,
|
||||||
* ..., 8) but only complete with letters, since numbers are
|
* ..., 9) but only complete with letters, since numbers are
|
||||||
* redundant. */
|
* redundant. */
|
||||||
return (char_u *)query_type[idx];
|
return (char_u *)query_type[idx];
|
||||||
}
|
}
|
||||||
@@ -791,6 +791,9 @@ cs_create_cmd(char *csoption, char *pattern)
|
|||||||
case '8' : case 'i' :
|
case '8' : case 'i' :
|
||||||
search = 8;
|
search = 8;
|
||||||
break;
|
break;
|
||||||
|
case '9' : case 'a' :
|
||||||
|
search = 9;
|
||||||
|
break;
|
||||||
default :
|
default :
|
||||||
(void)EMSG(_("E561: unknown cscope search type"));
|
(void)EMSG(_("E561: unknown cscope search type"));
|
||||||
cs_usage_msg(Find);
|
cs_usage_msg(Find);
|
||||||
@@ -1151,6 +1154,9 @@ cs_find_common(
|
|||||||
case '8' :
|
case '8' :
|
||||||
cmdletter = 'i';
|
cmdletter = 'i';
|
||||||
break;
|
break;
|
||||||
|
case '9' :
|
||||||
|
cmdletter = 'a';
|
||||||
|
break;
|
||||||
default :
|
default :
|
||||||
cmdletter = opt[0];
|
cmdletter = opt[0];
|
||||||
}
|
}
|
||||||
@@ -1352,7 +1358,8 @@ cs_help(exarg_T *eap UNUSED)
|
|||||||
" g: Find this definition\n"
|
" g: Find this definition\n"
|
||||||
" i: Find files #including this file\n"
|
" i: Find files #including this file\n"
|
||||||
" s: Find this C symbol\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++;
|
cmdp++;
|
||||||
}
|
}
|
||||||
|
@@ -753,6 +753,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1952,
|
||||||
/**/
|
/**/
|
||||||
1951,
|
1951,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user