diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-06-25 23:04:51 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-06-25 23:04:51 +0000 |
commit | f461c8e7f8ce2fd2ac3367680ec4c540f04ab259 (patch) | |
tree | bfacc7b1f4c7b6087026c9e8c39bb1f7b305d22f /src/tag.c | |
parent | ea408854a8360b6925122ce7709b424ab3005209 (diff) | |
download | vim-git-f461c8e7f8ce2fd2ac3367680ec4c540f04ab259.tar.gz |
updated for version 7.0093v7.0093
Diffstat (limited to 'src/tag.c')
-rw-r--r-- | src/tag.c | 31 |
1 files changed, 28 insertions, 3 deletions
@@ -122,7 +122,8 @@ static taggy_T ptag_entry = {NULL}; * type == DT_LAST: jump to last match of same tag * type == DT_SELECT: ":tselect [tag]", select tag from a list of all matches * type == DT_JUMP: ":tjump [tag]", jump to tag or select tag from a list - * type == DT_CSCOPE: use cscope to find the tag. + * type == DT_CSCOPE: use cscope to find the tag + * type == DT_FREE: free cached matches * * for cscope, returns TRUE if we jumped to tag or aborted, FALSE otherwise */ @@ -173,6 +174,19 @@ do_tag(tag, type, count, forceit, verbose) static char_u **matches = NULL; static int flags; +#ifdef EXITFREE + if (type == DT_FREE) + { + /* remove the list of matches */ + FreeWild(num_matches, matches); +# ifdef FEAT_CSCOPE + cs_free_tags(); +# endif + num_matches = 0; + return FALSE; + } +#endif + if (type == DT_HELP) { type = DT_TAG; @@ -2108,7 +2122,8 @@ line_read_in: * other tag: <mtt><tag_fname><NUL><NUL><lbuf> * without Emacs tags: <mtt><tag_fname><NUL><lbuf> */ - len = (int)STRLEN(tag_fname) + (int)STRLEN(lbuf_line) + 3; + len = (int)STRLEN(tag_fname) + + (int)STRLEN(lbuf_line) + 3; #ifdef FEAT_EMACS_TAGS if (is_etag) len += (int)STRLEN(ebuf) + 1; @@ -2345,6 +2360,17 @@ found_tagfile_cb(fname, cookie) vim_strsave(fname); } +static void *search_ctx = NULL; + +#if defined(EXITFREE) || defined(PROTO) + void +free_tag_stuff() +{ + vim_findfile_cleanup(search_ctx); + do_tag(NULL, DT_FREE, 0, 0, 0); +} +#endif + /* * Get the next name of a tag file from the tag file list. * For help files, use "tags" file only. @@ -2356,7 +2382,6 @@ get_tagfname(first, buf) int first; /* TRUE when first file name is wanted */ char_u *buf; /* pointer to buffer of MAXPATHL chars */ { - static void *search_ctx = NULL; static char_u *np = NULL; static int did_filefind_init; static int hf_idx = 0; |