summaryrefslogtreecommitdiff
path: root/src/testdir/test_quickfix.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-06-28 22:26:54 +0200
committerBram Moolenaar <Bram@vim.org>2017-06-28 22:26:54 +0200
commit9c4fefffb65a2ed9b4a5b0f1bde0da8f349470b5 (patch)
treef42e3bece7b33b3f135de3268fd68a331a7286ad /src/testdir/test_quickfix.vim
parent86f100dc0922e83bead7bcd5fd2bb2abbf153f46 (diff)
downloadvim-git-9c4fefffb65a2ed9b4a5b0f1bde0da8f349470b5.tar.gz
patch 8.0.0688: cannot resize the window in a FileType autocommandv8.0.0688
Problem: Cannot resize the window in a FileType autocommand. (Ingo Karkat) Solution: Add the CMDWIN flag to :resize. (test by Ingo Karkat, closes #1804)
Diffstat (limited to 'src/testdir/test_quickfix.vim')
-rw-r--r--src/testdir/test_quickfix.vim41
1 files changed, 29 insertions, 12 deletions
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index c5954585c..b3cc6891a 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -2190,18 +2190,6 @@ func Test_bufoverflow()
set efm&vim
endfunc
-func Test_cclose_from_copen()
- augroup QF_Test
- au!
- au FileType qf :call assert_fails(':cclose', 'E788')
- augroup END
- copen
- augroup QF_Test
- au!
- augroup END
- augroup! QF_Test
-endfunc
-
" Tests for getting the quickfix stack size
func XsizeTests(cchar)
call s:setup_commands(a:cchar)
@@ -2231,6 +2219,18 @@ func Test_Qf_Size()
call XsizeTests('l')
endfunc
+func Test_cclose_from_copen()
+ augroup QF_Test
+ au!
+ au FileType qf :call assert_fails(':cclose', 'E788')
+ augroup END
+ copen
+ augroup QF_Test
+ au!
+ augroup END
+ augroup! QF_Test
+endfunc
+
func Test_cclose_in_autocmd()
" Problem is only triggered if "starting" is zero, so that the OptionsSet
" event will be triggered.
@@ -2246,3 +2246,20 @@ func Test_cclose_in_autocmd()
augroup! QF_Test
call test_override('starting', 0)
endfunc
+
+func Test_resize_from_copen()
+ augroup QF_Test
+ au!
+ au FileType qf resize 5
+ augroup END
+ try
+ " This should succeed without any exception. No other buffers are
+ " involved in the autocmd.
+ copen
+ finally
+ augroup QF_Test
+ au!
+ augroup END
+ augroup! QF_Test
+ endtry
+endfunc