mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
Remove FEAT_TAG_ANYWHITE
This feature allow to use any white space characters instead of one <TAB> in tag files. It is disabled in vanilla Vim's default build configuration. Exuberant ctags use format with exactly one TAB.
This commit is contained in:
@@ -9742,9 +9742,6 @@ static void f_has(typval_T *argvars, typval_T *rettv)
|
|||||||
#endif
|
#endif
|
||||||
"tag_binary",
|
"tag_binary",
|
||||||
"tag_old_static",
|
"tag_old_static",
|
||||||
#ifdef FEAT_TAG_ANYWHITE
|
|
||||||
"tag_any_white",
|
|
||||||
#endif
|
|
||||||
#ifdef TERMINFO
|
#ifdef TERMINFO
|
||||||
"terminfo",
|
"terminfo",
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1516,13 +1516,8 @@ parse_line:
|
|||||||
if (orgpat.headlen
|
if (orgpat.headlen
|
||||||
) {
|
) {
|
||||||
tagp.tagname = lbuf;
|
tagp.tagname = lbuf;
|
||||||
#ifdef FEAT_TAG_ANYWHITE
|
|
||||||
tagp.tagname_end = skiptowhite(lbuf);
|
|
||||||
if (*tagp.tagname_end == NUL)
|
|
||||||
#else
|
|
||||||
tagp.tagname_end = vim_strchr(lbuf, TAB);
|
tagp.tagname_end = vim_strchr(lbuf, TAB);
|
||||||
if (tagp.tagname_end == NULL)
|
if (tagp.tagname_end == NULL)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (vim_strchr(lbuf, NL) == NULL) {
|
if (vim_strchr(lbuf, NL) == NULL) {
|
||||||
/* Truncated line, ignore it. Has been reported for
|
/* Truncated line, ignore it. Has been reported for
|
||||||
@@ -1557,17 +1552,9 @@ parse_line:
|
|||||||
for (p = lbuf; p < tagp.tagname_end; ++p) {
|
for (p = lbuf; p < tagp.tagname_end; ++p) {
|
||||||
if (*p == ':') {
|
if (*p == ':') {
|
||||||
if (tagp.fname == NULL)
|
if (tagp.fname == NULL)
|
||||||
#ifdef FEAT_TAG_ANYWHITE
|
|
||||||
tagp.fname = skipwhite(tagp.tagname_end);
|
|
||||||
#else
|
|
||||||
tagp.fname = tagp.tagname_end + 1;
|
tagp.fname = tagp.tagname_end + 1;
|
||||||
#endif
|
|
||||||
if ( fnamencmp(lbuf, tagp.fname, p - lbuf) == 0
|
if ( fnamencmp(lbuf, tagp.fname, p - lbuf) == 0
|
||||||
#ifdef FEAT_TAG_ANYWHITE
|
|
||||||
&& vim_iswhite(tagp.fname[p - lbuf])
|
|
||||||
#else
|
|
||||||
&& tagp.fname[p - lbuf] == TAB
|
&& tagp.fname[p - lbuf] == TAB
|
||||||
#endif
|
|
||||||
) {
|
) {
|
||||||
/* found one */
|
/* found one */
|
||||||
tagp.tagname = p + 1;
|
tagp.tagname = p + 1;
|
||||||
@@ -1675,20 +1662,10 @@ parse_line:
|
|||||||
* Can be a matching tag, isolate the file name and command.
|
* Can be a matching tag, isolate the file name and command.
|
||||||
*/
|
*/
|
||||||
if (tagp.fname == NULL)
|
if (tagp.fname == NULL)
|
||||||
#ifdef FEAT_TAG_ANYWHITE
|
|
||||||
tagp.fname = skipwhite(tagp.tagname_end);
|
|
||||||
#else
|
|
||||||
tagp.fname = tagp.tagname_end + 1;
|
tagp.fname = tagp.tagname_end + 1;
|
||||||
#endif
|
|
||||||
#ifdef FEAT_TAG_ANYWHITE
|
|
||||||
tagp.fname_end = skiptowhite(tagp.fname);
|
|
||||||
tagp.command = skipwhite(tagp.fname_end);
|
|
||||||
if (*tagp.command == NUL)
|
|
||||||
#else
|
|
||||||
tagp.fname_end = vim_strchr(tagp.fname, TAB);
|
tagp.fname_end = vim_strchr(tagp.fname, TAB);
|
||||||
tagp.command = tagp.fname_end + 1;
|
tagp.command = tagp.fname_end + 1;
|
||||||
if (tagp.fname_end == NULL)
|
if (tagp.fname_end == NULL)
|
||||||
#endif
|
|
||||||
i = FAIL;
|
i = FAIL;
|
||||||
else
|
else
|
||||||
i = OK;
|
i = OK;
|
||||||
@@ -2152,39 +2129,23 @@ parse_tag_line (
|
|||||||
|
|
||||||
/* Isolate the tagname, from lbuf up to the first white */
|
/* Isolate the tagname, from lbuf up to the first white */
|
||||||
tagp->tagname = lbuf;
|
tagp->tagname = lbuf;
|
||||||
#ifdef FEAT_TAG_ANYWHITE
|
|
||||||
p = skiptowhite(lbuf);
|
|
||||||
#else
|
|
||||||
p = vim_strchr(lbuf, TAB);
|
p = vim_strchr(lbuf, TAB);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
#endif
|
|
||||||
tagp->tagname_end = p;
|
tagp->tagname_end = p;
|
||||||
|
|
||||||
/* Isolate file name, from first to second white space */
|
/* Isolate file name, from first to second white space */
|
||||||
#ifdef FEAT_TAG_ANYWHITE
|
|
||||||
p = skipwhite(p);
|
|
||||||
#else
|
|
||||||
if (*p != NUL)
|
if (*p != NUL)
|
||||||
++p;
|
++p;
|
||||||
#endif
|
|
||||||
tagp->fname = p;
|
tagp->fname = p;
|
||||||
#ifdef FEAT_TAG_ANYWHITE
|
|
||||||
p = skiptowhite(p);
|
|
||||||
#else
|
|
||||||
p = vim_strchr(p, TAB);
|
p = vim_strchr(p, TAB);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
#endif
|
|
||||||
tagp->fname_end = p;
|
tagp->fname_end = p;
|
||||||
|
|
||||||
/* find start of search command, after second white space */
|
/* find start of search command, after second white space */
|
||||||
#ifdef FEAT_TAG_ANYWHITE
|
|
||||||
p = skipwhite(p);
|
|
||||||
#else
|
|
||||||
if (*p != NUL)
|
if (*p != NUL)
|
||||||
++p;
|
++p;
|
||||||
#endif
|
|
||||||
if (*p == NUL)
|
if (*p == NUL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
tagp->command = p;
|
tagp->command = p;
|
||||||
|
@@ -141,11 +141,7 @@ static char *(features[]) = {
|
|||||||
"+syntax",
|
"+syntax",
|
||||||
"+tag_binary",
|
"+tag_binary",
|
||||||
"+tag_old_static",
|
"+tag_old_static",
|
||||||
#ifdef FEAT_TAG_ANYWHITE
|
|
||||||
"+tag_any_white",
|
|
||||||
#else // ifdef FEAT_TAG_ANYWHITE
|
|
||||||
"-tag_any_white",
|
"-tag_any_white",
|
||||||
#endif // ifdef FEAT_TAG_ANYWHITE
|
|
||||||
#if defined(UNIX)
|
#if defined(UNIX)
|
||||||
|
|
||||||
// only Unix can have terminfo instead of termcap
|
// only Unix can have terminfo instead of termcap
|
||||||
|
Reference in New Issue
Block a user