diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-28 18:51:43 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-28 18:51:43 +0000 |
commit | e76062c078debed0df818f70e4db14ad7a7cb53a (patch) | |
tree | e43b3b076fdea909c460219e896237a8924ccb6b /src/testdir/test_autocmd.vim | |
parent | 74a694dbe20bb7dea4e06f474cf62e20f9c92f1d (diff) |
patch 9.0.0965: using one window for executing autocommands is insufficientv9.0.0965
Problem: Using one window for executing autocommands is insufficient.
Solution: Use up to five windows for executing autocommands.
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r-- | src/testdir/test_autocmd.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index a0d83ecf35..593e56819c 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -4068,4 +4068,27 @@ func Test_autocmd_split_dummy() call delete('Xerr') endfunc +" This was crashing because there was only one window to execute autocommands +" in. +func Test_autocmd_nested_setbufvar() + CheckFeature python3 + + set hidden + edit Xaaa + edit Xbbb + call setline(1, 'bar') + enew + au BufWriteCmd Xbbb ++nested call setbufvar('Xaaa', '&ft', 'foo') | bw! Xaaa + au FileType foo call py3eval('vim.current.buffer.options["cindent"]') + wall + + au! BufWriteCmd + au! FileType foo + set nohidden + call delete('Xaaa') + call delete('Xbbb') + %bwipe! +endfunc + + " vim: shiftwidth=2 sts=2 expandtab |