0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.0.0499: taglist() does not prioritize tags for a buffer

Problem:    taglist() does not prioritize tags for a buffer.
Solution:   Add an optional buffer argument. (Duncan McDougall, closes #1194)
This commit is contained in:
Bram Moolenaar
2017-03-21 17:09:10 +01:00
parent e94260f358
commit c6aafbaf3e
8 changed files with 44 additions and 10 deletions

View File

@@ -3876,11 +3876,11 @@ add_tag_field(
}
/*
* Add the tags matching the specified pattern to the list "list"
* as a dictionary
* Add the tags matching the specified pattern "pat" to the list "list"
* as a dictionary. Use "buf_fname" for priority, unless NULL.
*/
int
get_tags(list_T *list, char_u *pat)
get_tags(list_T *list, char_u *pat, char_u *buf_fname)
{
int num_matches, i, ret;
char_u **matches, *p;
@@ -3890,7 +3890,7 @@ get_tags(list_T *list, char_u *pat)
long is_static;
ret = find_tags(pat, &num_matches, &matches,
TAG_REGEXP | TAG_NOIC, (int)MAXCOL, NULL);
TAG_REGEXP | TAG_NOIC, (int)MAXCOL, buf_fname);
if (ret == OK && num_matches > 0)
{
for (i = 0; i < num_matches; ++i)