aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_quickfix.vim
diff options
context:
space:
mode:
authorYorick Peterse <git@yorickpeterse.com>2021-10-24 03:55:04 +0200
committerGitHub <noreply@github.com>2021-10-23 21:55:04 -0400
commit6acebb8b56e21247423a5692e9ca30dff05abb63 (patch)
treea80bbc7097d0f33208008730fd7835006a231f92 /src/nvim/testdir/test_quickfix.vim
parent9f392c071aab2e80bc0264f0665d048786cd2e1c (diff)
downloadrneovim-6acebb8b56e21247423a5692e9ca30dff05abb63.tar.gz
rneovim-6acebb8b56e21247423a5692e9ca30dff05abb63.tar.bz2
rneovim-6acebb8b56e21247423a5692e9ca30dff05abb63.zip
vim-patch:8.2.3547: opening the quickfix window triggers BufWinEnter twice (#16108)
Problem: Opening the quickfix window triggers BufWinEnter twice. (Yorick Peterse) Solution: Only trigger BufWinEnter with "quickfix". (closes vim/vim#9022) https://github.com/vim/vim/commit/1d30fde3c989a962e0e1af4cbcf90e1ea483f1f4
Diffstat (limited to 'src/nvim/testdir/test_quickfix.vim')
-rw-r--r--src/nvim/testdir/test_quickfix.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 18587b9b2c..8c6ce63ade 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -705,6 +705,23 @@ func Test_vimgreptitle()
augroup! QfBufWinEnter
endfunc
+func Test_bufwinenter_once()
+ augroup QfBufWinEnter
+ au!
+ au BufWinEnter * let g:got_afile ..= 'got ' .. expand('<afile>')
+ augroup END
+ let g:got_afile = ''
+ copen
+ call assert_equal('got quickfix', g:got_afile)
+
+ cclose
+ unlet g:got_afile
+ augroup QfBufWinEnter
+ au!
+ augroup END
+ augroup! QfBufWinEnter
+endfunc
+
func XqfTitleTests(cchar)
call s:setup_commands(a:cchar)