Patch 8.2.0934
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 #6215)
Files: src/quickfix.c, src/testdir/test_quickfix.vim
*** ../vim-8.2.0933/src/quickfix.c 2020-06-08 19:20:21.707831093 +0200
--- src/quickfix.c 2020-06-08 19:32:28.349973811 +0200
***************
*** 7963,7971 ****
{
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
decr_quickfix_busy();
return;
}
--- 7963,7972 ----
{
apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
curbuf->b_fname, TRUE, curbuf);
! // 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;
}
*** ../vim-8.2.0933/src/testdir/test_quickfix.vim 2020-06-08
19:20:21.707831093 +0200
--- src/testdir/test_quickfix.vim 2020-06-08 19:32:28.349973811 +0200
***************
*** 4918,4921 ****
--- 4918,4939 ----
call Xtest_qftextfunc('l')
endfunc
+ " Running :lhelpgrep command more than once in a help window, doesn't jump to
+ " the help topic
+ func Test_lhelpgrep_from_help_window()
+ call mkdir('Xtestdir/doc', 'p')
+ call writefile(['window'], 'Xtestdir/doc/a.txt')
+ call writefile(['buffer'], 'Xtestdir/doc/b.txt')
+ let save_rtp = &rtp
+ let &rtp = 'Xtestdir'
+ lhelpgrep window
+ lhelpgrep buffer
+ call assert_equal('b.txt', fnamemodify(@%, ":p:t"))
+ lhelpgrep window
+ call assert_equal('a.txt', fnamemodify(@%, ":p:t"))
+ let &rtp = save_rtp
+ call delete('Xtestdir', 'rf')
+ new | only!
+ endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.0933/src/version.c 2020-06-08 19:20:21.707831093 +0200
--- src/version.c 2020-06-08 19:35:42.221363517 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 934,
/**/
--
Yah, well, we had to carve our electrons out of driftwood we'd
find. In the winter. Uphill. Both ways.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202006081736.058HaS63353248%40masaka.moolenaar.net.