mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 23:08:16 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user