Mercurial > vim
diff src/testdir/test_visual.vim @ 28893:aa44d5842d6c v8.2.4969
patch 8.2.4969: changing text in Visual mode may cause invalid memory access
Commit: https://github.com/vim/vim/commit/7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 16 19:40:59 2022 +0100
patch 8.2.4969: changing text in Visual mode may cause invalid memory access
Problem: Changing text in Visual mode may cause invalid memory access.
Solution: Check the Visual position after making a change.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 16 May 2022 20:45:03 +0200 |
parents | 5eea8a249f86 |
children | 05ac4ab2c282 |
line wrap: on
line diff
--- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim @@ -1296,6 +1296,16 @@ func Test_visual_block_append_invalid_ch set isprint& endfunc +func Test_visual_block_with_substitute() + " this was reading beyond the end of the line + new + norm a0) + sil! norm O + s/) + sil! norm + bwipe! +endfunc + func Test_visual_reselect_with_count() " this was causing an illegal memory access let lines =<< trim END