aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-22 06:28:49 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-23 18:17:09 -0400
commit3a49fa8f8b348b48e90860ec3fdf005d301ba9d0 (patch)
tree2c0008f3928bada854579c791a27476f8ac6788e
parentbb02ca6defb65110a426b579e81cd1a6f9eb886a (diff)
downloadrneovim-3a49fa8f8b348b48e90860ec3fdf005d301ba9d0.tar.gz
rneovim-3a49fa8f8b348b48e90860ec3fdf005d301ba9d0.tar.bz2
rneovim-3a49fa8f8b348b48e90860ec3fdf005d301ba9d0.zip
vim-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. https://github.com/vim/vim/commit/a9defadb8f03ecd03f3297305d5482ba380774dc
-rw-r--r--runtime/doc/quickfix.txt2
-rw-r--r--src/nvim/quickfix.c12
2 files changed, 9 insertions, 5 deletions
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index d20a91dc2d..7b9c418a46 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -1257,7 +1257,7 @@ to the file.
Changing directory
The following uppercase conversion characters specify the type of special
-format strings. At most one of them may be given as a prefix at the begin
+format strings. At most one of them may be given as a prefix at the beginning
of a single comma-separated format pattern.
Some compilers produce messages that consist of directory names that have to
be prepended to each file name read by %f (example: GNU make). The following
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 81da410826..6779f4e05d 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -2551,17 +2551,21 @@ void qf_list(exarg_T *eap)
}
// Support for filtering entries using :filter /pat/ clist
- int filter_entry = 1;
+ // Match against the module name, file name, search pattern and
+ // text of the entry.
+ bool filter_entry = true;
if (qfp->qf_module != NULL && *qfp->qf_module != NUL) {
filter_entry &= message_filtered(qfp->qf_module);
}
- if (fname != NULL) {
+ if (filter_entry && fname != NULL) {
filter_entry &= message_filtered(fname);
}
- if (qfp->qf_pattern != NULL) {
+ if (filter_entry && qfp->qf_pattern != NULL) {
filter_entry &= message_filtered(qfp->qf_pattern);
}
- filter_entry &= message_filtered(qfp->qf_text);
+ if (filter_entry) {
+ filter_entry &= message_filtered(qfp->qf_text);
+ }
if (filter_entry) {
goto next_entry;
}