Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
28892:4df932719c00 | 28893:aa44d5842d6c |
---|---|
1294 call assert_equal([' - let xxx', 'xxxxx -', 'xxxxxxxx-xxx'], getline(1, 3)) | 1294 call assert_equal([' - let xxx', 'xxxxx -', 'xxxxxxxx-xxx'], getline(1, 3)) |
1295 bwipe! | 1295 bwipe! |
1296 set isprint& | 1296 set isprint& |
1297 endfunc | 1297 endfunc |
1298 | 1298 |
1299 func Test_visual_block_with_substitute() | |
1300 " this was reading beyond the end of the line | |
1301 new | |
1302 norm a0) | |
1303 sil! norm O | |
1304 s/) | |
1305 sil! norm | |
1306 bwipe! | |
1307 endfunc | |
1308 | |
1299 func Test_visual_reselect_with_count() | 1309 func Test_visual_reselect_with_count() |
1300 " this was causing an illegal memory access | 1310 " this was causing an illegal memory access |
1301 let lines =<< trim END | 1311 let lines =<< trim END |
1302 | 1312 |
1303 | 1313 |