diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-11-29 18:20:11 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-29 20:36:31 +0800 |
| commit | 3173d07564e7cdf0834099a379f0faf480c76224 (patch) | |
| tree | 2ced5358c126a6015f0b66a1e015542f039ac29f /src/nvim/testdir | |
| parent | 273358651af6b6d172944cd1b1b41a9869d53b10 (diff) | |
| download | rneovim-3173d07564e7cdf0834099a379f0faf480c76224.tar.gz rneovim-3173d07564e7cdf0834099a379f0faf480c76224.tar.bz2 rneovim-3173d07564e7cdf0834099a379f0faf480c76224.zip | |
vim-patch:9.0.0965: using one window for executing autocommands is insufficient
Problem: Using one window for executing autocommands is insufficient.
Solution: Use up to five windows for executing autocommands.
https://github.com/vim/vim/commit/e76062c078debed0df818f70e4db14ad7a7cb53a
N/A patches for version.c:
vim-patch:9.0.0966: some compilers don't allow a declaration after a label
Problem: Some compilers don't allow a declaration after a label.
Solution: Move the declaration to the start of the block. (John Marriott)
https://github.com/vim/vim/commit/f86490ed4fdab213a28f667abd055c023a73d645
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_autocmd.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index 6fa191d928..199721b15e 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -3483,4 +3483,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 |