aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-05-05 23:17:34 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-05-05 23:18:47 +0200
commit4658e9c1d9ba52edcdaec1ba5d6075b6bcef6771 (patch)
tree783008d263f4e7a9986e819c8d67097775f13d1c /src/nvim/quickfix.c
parent4b65a0059aff80802783824ab3d973543a83a7c6 (diff)
downloadrneovim-4658e9c1d9ba52edcdaec1ba5d6075b6bcef6771.tar.gz
rneovim-4658e9c1d9ba52edcdaec1ba5d6075b6bcef6771.tar.bz2
rneovim-4658e9c1d9ba52edcdaec1ba5d6075b6bcef6771.zip
vim-patch:8.0.1750: crash clearing location list #9968
Problem: Crash when clearing loccation list in autocommand. Solution: Check if "qi" equals "ql_info". (Yegappan Lakshmanan) https://github.com/vim/vim/commit/3b9474b4ad4d85b5396f7f641b436f193dc9d486
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c5
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;
}