summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-08-09 22:14:48 +0200
committerBram Moolenaar <Bram@vim.org>2010-08-09 22:14:48 +0200
commitbc226b6ded1ede02f0543cc5f24d6e363ba66c0b (patch)
treecd98e8c6a82e618cd1d79b300849fa4fdc5a7713
parent314f11d44c5a8b011640b9e1a26bc71df4156b52 (diff)
Fix: :ltag command did not set w:quickfix_title. (Lech Lorens)
-rw-r--r--src/eval.c2
-rw-r--r--src/proto/quickfix.pro2
-rw-r--r--src/quickfix.c7
-rw-r--r--src/tag.c3
4 files changed, 8 insertions, 6 deletions
diff --git a/src/eval.c b/src/eval.c
index 6d6f9b40cd..fc01006f2e 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -15824,7 +15824,7 @@ set_qf_ll_list(wp, list_arg, action_arg, rettv)
action = *act;
}
- if (l != NULL && set_errorlist(wp, l, action) == OK)
+ if (l != NULL && set_errorlist(wp, l, action, NULL) == OK)
rettv->vval.v_number = 0;
}
#endif
diff --git a/src/proto/quickfix.pro b/src/proto/quickfix.pro
index 65ef438db4..a5c690f646 100644
--- a/src/proto/quickfix.pro
+++ b/src/proto/quickfix.pro
@@ -23,7 +23,7 @@ void ex_cfile __ARGS((exarg_T *eap));
void ex_vimgrep __ARGS((exarg_T *eap));
char_u *skip_vimgrep_pat __ARGS((char_u *p, char_u **s, int *flags));
int get_errorlist __ARGS((win_T *wp, list_T *list));
-int set_errorlist __ARGS((win_T *wp, list_T *list, int action));
+int set_errorlist __ARGS((win_T *wp, list_T *list, int action, char_u *title));
void ex_cbuffer __ARGS((exarg_T *eap));
void ex_cexpr __ARGS((exarg_T *eap));
void ex_helpgrep __ARGS((exarg_T *eap));
diff --git a/src/quickfix.c b/src/quickfix.c
index 3ecc81c724..c67397a5a3 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -3593,13 +3593,14 @@ get_errorlist(wp, list)
/*
* Populate the quickfix list with the items supplied in the list
- * of dictionaries.
+ * of dictionaries. "title" will be copied to w:quickfix_title
*/
int
-set_errorlist(wp, list, action)
+set_errorlist(wp, list, action, title)
win_T *wp;
list_T *list;
int action;
+ char_u *title;
{
listitem_T *li;
dict_T *d;
@@ -3623,7 +3624,7 @@ set_errorlist(wp, list, action)
if (action == ' ' || qi->qf_curlist == qi->qf_listcount)
/* make place for a new list */
- qf_new_list(qi, NULL);
+ qf_new_list(qi, title);
else if (action == 'a' && qi->qf_lists[qi->qf_curlist].qf_count > 0)
/* Adding to existing list, find last entry. */
for (prevp = qi->qf_lists[qi->qf_curlist].qf_start;
diff --git a/src/tag.c b/src/tag.c
index 949d5d1908..d7a9a10372 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -911,7 +911,8 @@ do_tag(tag, type, count, forceit, verbose)
dict_add_nr_str(dict, "pattern", 0L, cmd);
}
- set_errorlist(curwin, list, ' ');
+ vim_snprintf(IObuff, IOSIZE, "ltag %s", tag);
+ set_errorlist(curwin, list, ' ', IObuff);
list_free(list, TRUE);