aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-01 13:25:39 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-01 13:28:35 -0500
commit86ae394aeb6f2223f5e9a4e98bc9ee1dcbe130dd (patch)
treee6b299ed8aecc4800ad872902c9ce1c4a8b4d4ce /src/nvim/quickfix.c
parent134ea0c935dd04e04d28c4a36161872345f66bf3 (diff)
downloadrneovim-86ae394aeb6f2223f5e9a4e98bc9ee1dcbe130dd.tar.gz
rneovim-86ae394aeb6f2223f5e9a4e98bc9ee1dcbe130dd.tar.bz2
rneovim-86ae394aeb6f2223f5e9a4e98bc9ee1dcbe130dd.zip
vim-patch:8.2.0934: lhelpgrep twice in help window doesn't jump to the help topic
Problem: Running lhelpgrep twice in a help window doesn't jump to the help topic. Solution: Check whether any window with the location list is present. (Yegappan Lakshmanan, closes vim/vim#6215) https://github.com/vim/vim/commit/ec98e93a82379ca9289d8021aec374aa6798afef
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index d083d2890c..8f071390b3 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -6952,8 +6952,9 @@ void ex_helpgrep(exarg_T *eap)
if (au_name != NULL) {
apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
curbuf->b_fname, true, curbuf);
- if (!new_qi && IS_LL_STACK(qi) && qf_find_buf(qi) == NULL) {
- // autocommands made "qi" invalid
+ // When adding a location list to an existing location list stack,
+ // if the autocmd made the stack invalid, then just return.
+ if (!new_qi && IS_LL_STACK(qi) && qf_find_win_with_loclist(qi) == NULL) {
decr_quickfix_busy();
return;
}