From 18435a25347eeecb0886281d278c060aa7f82f6c Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 9 Nov 2018 03:33:28 -0500 Subject: vim-patch:8.1.0337: :file fails in quickfix command (#9215) Problem: :file fails in quickfix command. Solution: Allow :file without argument when curbuf_lock is set. (Jason Franklin) https://github.com/vim/vim/commit/379fb76b080521f7c09265ec3264b9e698923518 --- src/nvim/testdir/test_quickfix.vim | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/nvim/testdir/test_quickfix.vim') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 624e642e7f..bfe5791ec8 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -2235,6 +2235,35 @@ func Test_cclose_in_autocmd() " call test_override('starting', 0) endfunc +" Check that ":file" without an argument is possible even when "curbuf_lock" +" is set. +func Test_file_from_copen() + " Works without argument. + augroup QF_Test + au! + au FileType qf file + augroup END + copen + + augroup QF_Test + au! + augroup END + cclose + + " Fails with argument. + augroup QF_Test + au! + au FileType qf call assert_fails(':file foo', 'E788') + augroup END + copen + augroup QF_Test + au! + augroup END + cclose + + augroup! QF_Test +endfunction + func Test_resize_from_copen() augroup QF_Test au! -- cgit