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)
ec98e93a82
This commit is contained in:
Jan Edmund Lazo
2021-01-01 13:25:39 -05:00
parent 134ea0c935
commit 86ae394aeb
2 changed files with 21 additions and 2 deletions

View File

@@ -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;
}