comparison src/quickfix.c @ 14307:df27d6270691 v8.1.0169

patch 8.1.0169: calling message_filtered() a bit too often commit https://github.com/vim/vim/commit/a9defadb8f03ecd03f3297305d5482ba380774dc Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 8 18:20:24 2018 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Sun, 08 Jul 2018 18:30:06 +0200
parents 3c80092eb211
children 19d99d9e670c
comparison
equal deleted inserted replaced
14306:006f608a77b5 14307:df27d6270691
3137 } 3137 }
3138 if (fname == NULL) 3138 if (fname == NULL)
3139 sprintf((char *)IObuff, "%2d", i); 3139 sprintf((char *)IObuff, "%2d", i);
3140 else 3140 else
3141 vim_snprintf((char *)IObuff, IOSIZE, "%2d %s", 3141 vim_snprintf((char *)IObuff, IOSIZE, "%2d %s",
3142 i, (char *)fname); 3142 i, (char *)fname);
3143 } 3143 }
3144 3144
3145 // Support for filtering entries using :filter /pat/ clist 3145 // 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;
3147 if (qfp->qf_module != NULL && *qfp->qf_module != NUL) 3149 if (qfp->qf_module != NULL && *qfp->qf_module != NUL)
3148 filter_entry &= message_filtered(qfp->qf_module); 3150 filter_entry &= message_filtered(qfp->qf_module);
3149 if (fname != NULL) 3151 if (filter_entry && fname != NULL)
3150 filter_entry &= message_filtered(fname); 3152 filter_entry &= message_filtered(fname);
3151 if (qfp->qf_pattern != NULL) 3153 if (filter_entry && qfp->qf_pattern != NULL)
3152 filter_entry &= message_filtered(qfp->qf_pattern); 3154 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);
3154 if (filter_entry) 3157 if (filter_entry)
3155 goto next_entry; 3158 goto next_entry;
3156 3159
3157 msg_putchar('\n'); 3160 msg_putchar('\n');
3158 msg_outtrans_attr(IObuff, i == qi->qf_lists[qi->qf_curlist].qf_index 3161 msg_outtrans_attr(IObuff, i == qi->qf_lists[qi->qf_curlist].qf_index