diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-10-05 21:33:08 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-10-05 22:40:28 +0800 |
commit | a66b12378b1431f886c9b4235160abb171bcb05a (patch) | |
tree | cac95b5d8ff20b8382bebcb43e939adca9c252bc /src/nvim/testdir | |
parent | 0ae47000e060ad21896c0bb434e99d9a7d8c02b9 (diff) | |
download | rneovim-a66b12378b1431f886c9b4235160abb171bcb05a.tar.gz rneovim-a66b12378b1431f886c9b4235160abb171bcb05a.tar.bz2 rneovim-a66b12378b1431f886c9b4235160abb171bcb05a.zip |
vim-patch:8.2.2463: using :arglocal in an autocommand may use freed memory
Problem: Using :arglocal in an autocommand may use freed memory.
(houyunsong)
Solution: Check if the arglist is locked.
https://github.com/vim/vim/commit/6bcb877ec19a647443195a54eeac60cb693fd827
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_autocmd.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index 07042eab32..c320d3ca78 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -3010,6 +3010,15 @@ func Test_Visual_doautoall_redraw() %bwipe! endfunc +" This was using freed memory. +func Test_BufNew_arglocal() + arglocal + au BufNew * arglocal + call assert_fails('drop xx', 'E1156:') + + au! BufNew +endfunc + func Test_autocmd_closes_window() au BufNew,BufWinLeave * e %e file yyy |