patch 9.0.2064: cannot use buffer-number for errorformat
Problem: cannot use buffer-number for errorformat
Solution: add support for parsing a buffer number using '%b' in
'errorformat'
closes: #13419
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index 96ba382..cbfd791 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -1422,6 +1422,7 @@
Basic items
%f file name (finds a string)
+ %b buffer number (finds a number)
%o module name (finds a string)
%l line number (finds a number)
%e end line number (finds a number)
@@ -1461,6 +1462,11 @@
This means that a file name which is a single alphabetical letter will not be
detected.
+The "%b" conversion is used to parse a buffer number. This is useful for
+referring to lines in a scratch buffer or a buffer with no name. If a buffer
+with the matching number doesn't exist, then that line is used as a non-error
+line.
+
The "%p" conversion is normally followed by a "^". It's used for compilers
that output a line like: >
^
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 4dc8db4..3a7b6ef 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -5945,8 +5945,6 @@
7 Instead of filtering errors with a shell script it should be possible to
do this with Vim script. A function that filters the raw text that comes
from the 'makeprg'?
-- Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
- Govindachar)
7 Allow a window not to have a statusline. Makes it possible to use a
window as a buffer-tab selection.
8 Allow non-active windows to have a different statusline. (Yakov Lerner)