summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-22 22:44:10 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-22 22:44:10 +0100
commit6920c72d4d62c8dc5596e9f392e38204f561d7af (patch)
treec4f6d6718ccad3e1e7769c66a76e91842e3e97f2
parent09e786e7a7fc952f43e3f88ba49ab1ac6ef3b3a3 (diff)
patch 7.4.1153v7.4.1153
Problem: Autocommands triggered by quickfix cannot always get the current title value. Solution: Call qf_fill_buffer() later. (Christian Brabandt)
-rw-r--r--src/quickfix.c5
-rw-r--r--src/testdir/test_quickfix.vim14
-rw-r--r--src/version.c2
3 files changed, 18 insertions, 3 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 014b93df34..da405ed58d 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2605,17 +2605,16 @@ qf_update_buffer(qi)
/* set curwin/curbuf to buf and save a few things */
aucmd_prepbuf(&aco, buf);
- qf_fill_buffer(qi);
-
if ((win = qf_find_win(qi)) != NULL)
{
curwin_save = curwin;
curwin = win;
qf_set_title_var(qi);
curwin = curwin_save;
-
}
+ qf_fill_buffer(qi);
+
/* restore curwin/curbuf and a few other things */
aucmd_restbuf(&aco);
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index a4d0f209e2..5e68450239 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -302,3 +302,17 @@ function Test_helpgrep()
cclose
endfunc
+func Test_errortitle()
+ augroup QfBufWinEnter
+ au!
+ au BufWinEnter * :let g:a=get(w:, 'quickfix_title', 'NONE')
+ augroup END
+ copen
+ let a=[{'lnum': 308, 'bufnr': bufnr(''), 'col': 58, 'valid': 1, 'vcol': 0, 'nr': 0, 'type': '', 'pattern': '', 'text': ' au BufWinEnter * :let g:a=get(w:, ''quickfix_title'', ''NONE'')'}]
+ call setqflist(a)
+ call assert_equal(':setqflist()', g:a)
+ augroup QfBufWinEnter
+ au!
+ augroup END
+ augroup! QfBufWinEnter
+endfunc
diff --git a/src/version.c b/src/version.c
index 34cfad4dfe..c964b3cad5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1153,
+/**/
1152,
/**/
1151,