patch 7.4.718
Problem: Autocommands triggered by quickfix cannot get the current title
value.
Solution: Set w:quickfix_title earlier. (Yannick)
Also move the check for a title into the function.
diff --git a/src/quickfix.c b/src/quickfix.c
index 186520a..d4db0d2 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2452,14 +2452,13 @@
prevwin = win;
}
+ qf_set_title_var(qi);
+
/*
* Fill the buffer with the quickfix list.
*/
qf_fill_buffer(qi);
- if (qi->qf_lists[qi->qf_curlist].qf_title != NULL)
- qf_set_title_var(qi);
-
curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index;
curwin->w_cursor.col = 0;
check_cursor();
@@ -2608,8 +2607,7 @@
qf_fill_buffer(qi);
- if (qi->qf_lists[qi->qf_curlist].qf_title != NULL
- && (win = qf_find_win(qi)) != NULL)
+ if ((win = qf_find_win(qi)) != NULL)
{
curwin_save = curwin;
curwin = win;
@@ -2625,11 +2623,15 @@
}
}
+/*
+ * Set "w:quickfix_title" if "qi" has a title.
+ */
static void
qf_set_title_var(qi)
qf_info_T *qi;
{
- set_internal_string_var((char_u *)"w:quickfix_title",
+ if (qi->qf_lists[qi->qf_curlist].qf_title != NULL)
+ set_internal_string_var((char_u *)"w:quickfix_title",
qi->qf_lists[qi->qf_curlist].qf_title);
}
diff --git a/src/version.c b/src/version.c
index ee6d301..ab9d100 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 718,
+/**/
717,
/**/
716,