comparison src/testdir/test_quickfix.vim @ 11589:39787def24bb v8.0.0677

patch 8.0.0677: setting 'filetype' may switch buffers commit https://github.com/vim/vim/commit/1814183b865059679f6ee526ec23fc575e536e66 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 25 21:17:25 2017 +0200 patch 8.0.0677: setting 'filetype' may switch buffers Problem: Setting 'filetype' internally may cause the current buffer and window to change unexpectedly. Solution: Set curbuf_lock. (closes #1734)
author Christian Brabandt <cb@256bit.org>
date Sun, 25 Jun 2017 21:30:04 +0200
parents f5add45f9848
children 6f11697fb92c
comparison
equal deleted inserted replaced
11588:9ea6a69996fe 11589:39787def24bb
2188 endfunc 2188 endfunc
2189 2189
2190 func Test_cclose_from_copen() 2190 func Test_cclose_from_copen()
2191 augroup QF_Test 2191 augroup QF_Test
2192 au! 2192 au!
2193 au FileType qf :cclose 2193 au FileType qf :call assert_fails(':cclose', 'E788')
2194 augroup END 2194 augroup END
2195 copen 2195 copen
2196 augroup QF_Test 2196 augroup QF_Test
2197 au! 2197 au!
2198 augroup END 2198 augroup END
2225 2225
2226 func Test_Qf_Size() 2226 func Test_Qf_Size()
2227 call XsizeTests('c') 2227 call XsizeTests('c')
2228 call XsizeTests('l') 2228 call XsizeTests('l')
2229 endfunc 2229 endfunc
2230
2231 func Test_cclose_in_autocmd()
2232 " Problem is only triggered if "starting" is zero, so that the OptionsSet
2233 " event will be triggered.
2234 call test_override('starting', 1)
2235 augroup QF_Test
2236 au!
2237 au FileType qf :call assert_fails(':cclose', 'E788')
2238 augroup END
2239 copen
2240 augroup QF_Test
2241 au!
2242 augroup END
2243 augroup! QF_Test
2244 call test_override('starting', 0)
2245 endfunc