@@ -3051,6 +3051,7 @@ qf_list(exarg_T *eap)
30513051 int qfFileAttr ;
30523052 int qfSepAttr ;
30533053 int qfLineAttr ;
3054+ int filter_entry ;
30543055 int all = eap -> forceit ; /* if not :cl!, only show
30553056 recognised errors */
30563057 qf_info_T * qi = & ql_info ;
@@ -3120,7 +3121,6 @@ qf_list(exarg_T *eap)
31203121 {
31213122 if ((qfp -> qf_valid || all ) && idx1 <= i && i <= idx2 )
31223123 {
3123- msg_putchar ('\n' );
31243124 if (got_int )
31253125 break ;
31263126
@@ -3141,6 +3141,20 @@ qf_list(exarg_T *eap)
31413141 vim_snprintf ((char * )IObuff , IOSIZE , "%2d %s" ,
31423142 i , (char * )fname );
31433143 }
3144+
3145+ // Support for filtering entries using :filter /pat/ clist
3146+ filter_entry = 1 ;
3147+ if (qfp -> qf_module != NULL && * qfp -> qf_module != NUL )
3148+ filter_entry &= message_filtered (qfp -> qf_module );
3149+ if (fname != NULL )
3150+ filter_entry &= message_filtered (fname );
3151+ if (qfp -> qf_pattern != NULL )
3152+ filter_entry &= message_filtered (qfp -> qf_pattern );
3153+ filter_entry &= message_filtered (qfp -> qf_text );
3154+ if (filter_entry )
3155+ goto next_entry ;
3156+
3157+ msg_putchar ('\n' );
31443158 msg_outtrans_attr (IObuff , i == qi -> qf_lists [qi -> qf_curlist ].qf_index
31453159 ? HL_ATTR (HLF_QFL ) : qfFileAttr );
31463160
@@ -3175,6 +3189,7 @@ qf_list(exarg_T *eap)
31753189 out_flush (); /* show one line at a time */
31763190 }
31773191
3192+ next_entry :
31783193 qfp = qfp -> qf_next ;
31793194 if (qfp == NULL )
31803195 break ;
@@ -4186,6 +4201,7 @@ ex_make(exarg_T *eap)
41864201 }
41874202 if (res >= 0 )
41884203 qf_list_changed (qi , qi -> qf_curlist );
4204+
41894205 // Remember the current quickfix list identifier, so that we can
41904206 // check for autocommands changing the current quickfix list.
41914207 save_qfid = qi -> qf_lists [qi -> qf_curlist ].qf_id ;
0 commit comments