aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
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/testdir
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/testdir')
-rw-r--r--src/nvim/testdir/test_quickfix.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 2b00f828f7..be7ea908c7 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -4625,6 +4625,24 @@ func Test_cquit()
call assert_fails('-3cquit', 'E16:')
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
+
" Test for adding an invalid entry with the quickfix window open and making
" sure that the window contents are not changed
func Test_add_invalid_entry_with_qf_window()