diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-09-18 13:49:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-18 13:49:39 +0200 |
commit | c12801986c1d4c219a4a1d6fc30ec15c03d963b6 (patch) | |
tree | 0faab0801f82b21d97d04b1850822ed1963ad43b /src | |
parent | e1079c2a289de18923950338ea08ee80c01cc6cf (diff) | |
parent | 89a7a4f02c35e414bc0bd33560738c9cf0abe33e (diff) | |
download | rneovim-c12801986c1d4c219a4a1d6fc30ec15c03d963b6.tar.gz rneovim-c12801986c1d4c219a4a1d6fc30ec15c03d963b6.tar.bz2 rneovim-c12801986c1d4c219a4a1d6fc30ec15c03d963b6.zip |
Merge #5254 from KillTheMule/vim-7.4.1952
vim-patch:7.4.{1952, 1990, 2033, 2284}
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/if_cscope.c | 35 | ||||
-rw-r--r-- | src/nvim/if_cscope_defs.h | 13 | ||||
-rw-r--r-- | src/nvim/option_defs.h | 22 | ||||
-rw-r--r-- | src/nvim/testdir/Makefile | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_cscope.vim | 15 | ||||
-rw-r--r-- | src/nvim/version.c | 7 |
6 files changed, 53 insertions, 40 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c index 6f19b60f65..3ed85677fc 100644 --- a/src/nvim/if_cscope.c +++ b/src/nvim/if_cscope.c @@ -51,7 +51,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 a|c|d|e|f|g|i|s|t name", 1 }, { "help", cs_help, N_("Show this message"), "help", 0 }, { "kill", cs_kill, @@ -104,13 +104,13 @@ char_u *get_cscope_name(expand_T *xp, int idx) { const char *query_type[] = { - "c", "d", "e", "f", "g", "i", "s", "t", NULL + "a", "c", "d", "e", "f", "g", "i", "s", "t", 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 - * redundant. */ + // Complete with query type of ":cscope find {query_type}". + // {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]; } case EXP_CSCOPE_KILL: @@ -673,6 +673,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); @@ -969,6 +972,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]; } @@ -1125,14 +1131,15 @@ static int cs_help(exarg_T *eap) cmdp->usage); if (strcmp(cmdp->name, "find") == 0) MSG_PUTS(_("\n" - " c: Find functions calling this function\n" - " d: Find functions called by this function\n" - " e: Find this egrep pattern\n" - " f: Find this file\n" - " g: Find this definition\n" - " i: Find files #including this file\n" - " s: Find this C symbol\n" - " t: Find this text string\n")); + " a: Find assignments to this symbol\n" + " c: Find functions calling this function\n" + " d: Find functions called by this function\n" + " e: Find this egrep pattern\n" + " f: Find this file\n" + " g: Find this definition\n" + " i: Find files #including this file\n" + " s: Find this C symbol\n" + " t: Find this text string\n")); cmdp++; } diff --git a/src/nvim/if_cscope_defs.h b/src/nvim/if_cscope_defs.h index 8cd74c74e6..f9d06eaea3 100644 --- a/src/nvim/if_cscope_defs.h +++ b/src/nvim/if_cscope_defs.h @@ -25,18 +25,7 @@ #define CSCOPE_DBFILE "cscope.out" #define CSCOPE_PROMPT ">> " -/* - * s 0name Find this C symbol - * g 1name Find this definition - * d 2name Find functions called by this function - * c 3name Find functions calling this function - * t 4string find text string (cscope 12.9) - * t 4name Find assignments to (cscope 13.3) - * 5pattern change pattern -- NOT USED - * e 6pattern Find this egrep pattern - * f 7name Find this file - * i 8name Find files #including this file - */ +// See ":help cscope-find" for the possible queries. typedef struct { char * name; diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h index 8d6f42e088..e36cceaaf4 100644 --- a/src/nvim/option_defs.h +++ b/src/nvim/option_defs.h @@ -370,17 +370,17 @@ static char *(p_cb_values[]) = {"unnamed", "unnamedplus", NULL}; # define CB_UNNAMED 0x001 # define CB_UNNAMEDPLUS 0x002 # define CB_UNNAMEDMASK (CB_UNNAMED | CB_UNNAMEDPLUS) -EXTERN long p_cwh; /* 'cmdwinheight' */ -EXTERN long p_ch; /* 'cmdheight' */ -EXTERN int p_confirm; /* 'confirm' */ -EXTERN int p_cp; /* 'compatible' */ -EXTERN char_u *p_cot; /* 'completeopt' */ -EXTERN long p_ph; /* 'pumheight' */ -EXTERN char_u *p_cpo; /* 'cpoptions' */ -EXTERN char_u *p_csprg; /* 'cscopeprg' */ -EXTERN int p_csre; /* 'cscoperelative' */ -EXTERN char_u *p_csqf; /* 'cscopequickfix' */ -# define CSQF_CMDS "sgdctefi" +EXTERN long p_cwh; // 'cmdwinheight' +EXTERN long p_ch; // 'cmdheight' +EXTERN int p_confirm; // 'confirm' +EXTERN int p_cp; // 'compatible' +EXTERN char_u *p_cot; // 'completeopt' +EXTERN long p_ph; // 'pumheight' +EXTERN char_u *p_cpo; // 'cpoptions' +EXTERN char_u *p_csprg; // 'cscopeprg' +EXTERN int p_csre; // 'cscoperelative' +EXTERN char_u *p_csqf; // 'cscopequickfix' +# define CSQF_CMDS "sgdctefia" # define CSQF_FLAGS "+-0" EXTERN int p_cst; /* 'cscopetag' */ EXTERN long p_csto; /* 'cscopetagorder' */ diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index b7aacc7b3b..ff0f729460 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -32,6 +32,7 @@ SCRIPTS := \ # Tests using runtest.vim.vim. # Keep test_alot*.res as the last one, sort the others. NEW_TESTS = \ + test_cscope.res \ test_hardcopy.res \ test_help_tagjump.res \ test_langmap.res \ diff --git a/src/nvim/testdir/test_cscope.vim b/src/nvim/testdir/test_cscope.vim new file mode 100644 index 0000000000..b6d70f0765 --- /dev/null +++ b/src/nvim/testdir/test_cscope.vim @@ -0,0 +1,15 @@ +" Test for cscope commands. + +if !has('cscope') + finish +endif + +func Test_cscopequickfix() + set cscopequickfix=s-,g-,d+,c-,t+,e-,f0,i-,a- + call assert_equal('s-,g-,d+,c-,t+,e-,f0,i-,a-', &cscopequickfix) + + call assert_fails('set cscopequickfix=x-', 'E474:') + call assert_fails('set cscopequickfix=s', 'E474:') + call assert_fails('set cscopequickfix=s7', 'E474:') + call assert_fails('set cscopequickfix=s-a', 'E474:') +endfunc diff --git a/src/nvim/version.c b/src/nvim/version.c index fa949224f3..c2f9ed49e7 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -74,6 +74,7 @@ static char *features[] = { // clang-format off static int included_patches[] = { + 2284, 2219, // 2200, // 2199, @@ -242,7 +243,7 @@ static int included_patches[] = { // 2036, // 2035 NA // 2034 NA - // 2033, + 2033, // 2032 NA // 2031, // 2030 NA @@ -285,7 +286,7 @@ static int included_patches[] = { // 1993, // 1992, // 1991, - // 1990, + 1990, // 1989, // 1988 NA // 1987 NA @@ -323,7 +324,7 @@ static int included_patches[] = { // 1955, // 1954, // 1953, - // 1952, + 1952, // 1951 NA // 1950, // 1949, |