The attached patch fixes the problem where file type for the quickfix
window is incorrectly detected. Such behaviour can be triggered by
entering the src directory in Vim's source code directory and
executing:
$ vim diff.c
:grep close diff.c
:copen
The quickfix window will be highlighted as if it was a diff file.
--
Cheers,
Lech
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
diff --git a/src/quickfix.c b/src/quickfix.c
index ee84160..6747f29 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2607,10 +2607,12 @@ qf_fill_buffer(qi)
curbuf->b_p_ma = FALSE;
#ifdef FEAT_AUTOCMD
+ keep_filetype = TRUE; /* don't detect 'filetype' */
apply_autocmds(EVENT_BUFREADPOST, (char_u *)"quickfix", NULL,
FALSE, curbuf);
apply_autocmds(EVENT_BUFWINENTER, (char_u *)"quickfix", NULL,
FALSE, curbuf);
+ keep_filetype = FALSE;
#endif
/* make sure it will be redrawn */