Skip to content

Commit a9defad

Browse files
committed
patch 8.1.0169: calling message_filtered() a bit too often
Problem: Calling message_filtered() a bit too often. Solution: Only call message_filtered() when filtering is already false.
1 parent 9d5185b commit a9defad

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

runtime/doc/quickfix.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,10 @@ processing a quickfix or location list command, it will be aborted.
298298
from the last error backwards, -1 being the last error.
299299
The 'switchbuf' settings are respected when jumping
300300
to a buffer.
301+
The |:filter| command can be used to display only the
302+
quickfix entries matching a supplied pattern. The
303+
pattern is matched against the filename, module name,
304+
pattern and text of the entry.
301305

302306
:cl[ist] +{count} List the current and next {count} valid errors. This
303307
is similar to ":clist from from+count", where "from"
@@ -1287,7 +1291,7 @@ to the file.
12871291
Changing directory
12881292

12891293
The following uppercase conversion characters specify the type of special
1290-
format strings. At most one of them may be given as a prefix at the begin
1294+
format strings. At most one of them may be given as a prefix at the beginning
12911295
of a single comma-separated format pattern.
12921296
Some compilers produce messages that consist of directory names that have to
12931297
be prepended to each file name read by %f (example: GNU make). The following

src/quickfix.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3139,18 +3139,21 @@ qf_list(exarg_T *eap)
31393139
sprintf((char *)IObuff, "%2d", i);
31403140
else
31413141
vim_snprintf((char *)IObuff, IOSIZE, "%2d %s",
3142-
i, (char *)fname);
3142+
i, (char *)fname);
31433143
}
31443144

31453145
// Support for filtering entries using :filter /pat/ clist
3146-
filter_entry = 1;
3146+
// Match against the module name, file name, search pattern and
3147+
// text of the entry.
3148+
filter_entry = TRUE;
31473149
if (qfp->qf_module != NULL && *qfp->qf_module != NUL)
31483150
filter_entry &= message_filtered(qfp->qf_module);
3149-
if (fname != NULL)
3151+
if (filter_entry && fname != NULL)
31503152
filter_entry &= message_filtered(fname);
3151-
if (qfp->qf_pattern != NULL)
3153+
if (filter_entry && qfp->qf_pattern != NULL)
31523154
filter_entry &= message_filtered(qfp->qf_pattern);
3153-
filter_entry &= message_filtered(qfp->qf_text);
3155+
if (filter_entry)
3156+
filter_entry &= message_filtered(qfp->qf_text);
31543157
if (filter_entry)
31553158
goto next_entry;
31563159

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,8 @@ static char *(features[]) =
789789

790790
static int included_patches[] =
791791
{ /* Add new patch number below this line */
792+
/**/
793+
169,
792794
/**/
793795
168,
794796
/**/

0 commit comments

Comments
 (0)