vim-patch:8.0.0499

Problem:    taglist() does not prioritize tags for a buffer.
Solution:   Add an optional buffer argument. (Duncan McDougall, closes vim/vim#1194)

c6aafbaf3e
This commit is contained in:
James McCoy
2017-04-07 16:08:58 -04:00
parent 13352c00f1
commit 20dc04470e
6 changed files with 41 additions and 12 deletions

View File

@@ -8728,8 +8728,7 @@ static void f_foldtextresult(typval_T *argvars, typval_T *rettv, FunPtr fptr)
}
fold_count = foldedCount(curwin, lnum, &foldinfo);
if (fold_count > 0) {
text = get_foldtext(curwin, lnum, lnum + fold_count - 1,
&foldinfo, buf);
text = get_foldtext(curwin, lnum, lnum + fold_count - 1, &foldinfo, buf);
if (text == buf)
text = vim_strsave(text);
rettv->vval.v_string = text;
@@ -16436,7 +16435,12 @@ static void f_taglist(typval_T *argvars, typval_T *rettv, FunPtr fptr)
return;
}
(void)get_tags(tv_list_alloc_ret(rettv), (char_u *)tag_pattern);
const char *fname = NULL;
if (argvars[1].v_type != VAR_UNKNOWN) {
fname = tv_get_string(&argvars[1]);
}
(void)get_tags(tv_list_alloc_ret(rettv), (char_u *)tag_pattern,
(char_u *)fname);
}
/*