diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-13 10:47:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-13 10:47:39 +0800 |
commit | a6b05cb75d330dd995d3ad21ee08bb0a2cfcae74 (patch) | |
tree | 6352994679c5a6c9d1afc18476acfd17f9187b59 /src/nvim/testdir | |
parent | 0b20762c6042f2bfc5facf05754fd549b95b3cc1 (diff) | |
download | rneovim-a6b05cb75d330dd995d3ad21ee08bb0a2cfcae74.tar.gz rneovim-a6b05cb75d330dd995d3ad21ee08bb0a2cfcae74.tar.bz2 rneovim-a6b05cb75d330dd995d3ad21ee08bb0a2cfcae74.zip |
vim-patch:9.0.0530: using freed memory when autocmd changes mark (#21396)
Problem: Using freed memory when autocmd changes mark.
Solution: Copy the mark before editing another buffer.
https://github.com/vim/vim/commit/8ecfa2c56b4992c7f067b92488aa9acea5a454ad
Nvim already copies the mark.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_marks.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_marks.vim b/src/nvim/testdir/test_marks.vim index b432b7bbbc..a7ccca498c 100644 --- a/src/nvim/testdir/test_marks.vim +++ b/src/nvim/testdir/test_marks.vim @@ -304,4 +304,17 @@ func Test_getmarklist() close! endfunc +" This was using freed memory +func Test_jump_mark_autocmd() + next 00 + edit 0 + sargument + au BufEnter 0 all + sil norm + + au! BufEnter + bwipe! +endfunc + + " vim: shiftwidth=2 sts=2 expandtab |