summaryrefslogtreecommitdiff
path: root/src/tag.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-03-21 17:09:10 +0100
committerBram Moolenaar <Bram@vim.org>2017-03-21 17:09:10 +0100
commitc6aafbaf3ea755e3ab4ee2e3045911126a08b038 (patch)
treed2a2ea57ffe7e8969d16c3d7423d53acd6e14b04 /src/tag.c
parente94260f3582cf928cc59e792b3b6ede57794a4a6 (diff)
downloadvim-c6aafbaf3ea755e3ab4ee2e3045911126a08b038.zip
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)
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tag.c b/src/tag.c
index 68d09c545..7710135fa 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -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)