diff options
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 8696754baf..269c4d43ca 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -5399,9 +5399,6 @@ void ex_helpgrep(exarg_T *eap) } } - // Autocommands may change the list. Save it for later comparison - qf_info_T *save_qi = qi; - regmatch.regprog = vim_regcomp(eap->arg, RE_MAGIC + RE_STRING); regmatch.rm_ic = FALSE; if (regmatch.regprog != NULL) { @@ -5499,7 +5496,7 @@ void ex_helpgrep(exarg_T *eap) if (au_name != NULL) { apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, curbuf->b_fname, true, curbuf); - if (!new_qi && qi != save_qi && qf_find_buf(qi) == NULL) { + if (!new_qi && qi != &ql_info && qf_find_buf(qi) == NULL) { // autocommands made "qi" invalid return; } |