Add "q" item for 'statusline'. Add w:quickfix_title. (Lech Lorens)
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 17c6a46..8e2b5e0 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -6523,6 +6523,7 @@
y F Type of file in the buffer, e.g., "[vim]". See 'filetype'.
Y F Type of file in the buffer, e.g., ",VIM". See 'filetype'.
{not available when compiled without |+autocmd| feature}
+ q S "[Quickfix List]", "[Location List]" or empty.
k S Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are
being used: "<keymap>"
n N Buffer number.
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index d710e97..972ebd8 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -301,7 +301,7 @@
=============================================================================
2. The error window *quickfix-window*
- *:cope* *:copen*
+ *:cope* *:copen* *w:quickfix_title*
:cope[n] [height] Open a window to show the current list of errors.
When [height] is given, the window becomes that high
(if there is room). Otherwise the window is made ten
@@ -310,7 +310,11 @@
'buftype' equal to "quickfix". Don't change this!
If there already is a quickfix window, it will be made
the current window. It is not possible to open a
- second quickfix window.
+ second quickfix window. The window will have the
+ w:quickfix_title variable set which will indicate the
+ command that produced the quickfix list. This can be
+ used to compose a custom status line if the value of
+ 'statusline' is adjusted properly.
*:lop* *:lopen*
:lop[en] [height] Open a window to show the location list for the
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index a7c9aaf..b89c25f 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -30,9 +30,6 @@
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Include patch for horizontal scoll wheel? (Bjorn Winckler, 2010 Jul 20)
-Additional patch Jul 21.
-
6 In the quickfix window statusline add the command used to get the list of
errors, e.g. ":make foo", ":grep something *.c".
New patch 2010 Jul 24
diff --git a/runtime/ftplugin/quickfix.vim b/runtime/ftplugin/quickfix.vim
new file mode 100644
index 0000000..f1d0922
--- /dev/null
+++ b/runtime/ftplugin/quickfix.vim
@@ -0,0 +1,16 @@
+" Vim filetype plugin file
+" Language: Vim's quickfix window
+" Maintainer: Lech Lorens <Lech.Lorens@gmail.com>
+" Last Changed: 22 Jul 2010
+
+if exists("b:did_ftplugin")
+ finish
+endif
+
+" Don't load another plugin for this buffer
+let b:did_ftplugin = 1
+
+let b:undo_ftplugin = "setl stl<"
+
+" Display the command that produced the list in the quickfix window:
+setlocal stl=%q%{exists('w:quickfix_title')?\ '\ '.w:quickfix_title\ :\ ''}