Mercurial > vim
comparison src/testdir/test_visual.vim @ 27245:776db9e02b61 v8.2.4151
patch 8.2.4151: reading beyond the end of a line
Commit: https://github.com/vim/vim/commit/57df9e8a9f9ae1aafdde9b86b10ad907627a87dc
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 20 12:10:48 2022 +0000
patch 8.2.4151: reading beyond the end of a line
Problem: Reading beyond the end of a line.
Solution: For block insert only use the offset for correcting the length.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 20 Jan 2022 13:15:04 +0100 |
parents | 353b71688c9d |
children | 85f56e16da9b |
comparison
equal
deleted
inserted
replaced
27244:e6b71732abc9 | 27245:776db9e02b61 |
---|---|
1307 | 1307 |
1308 bwipe! | 1308 bwipe! |
1309 call delete('XvisualReselect') | 1309 call delete('XvisualReselect') |
1310 endfunc | 1310 endfunc |
1311 | 1311 |
1312 func Test_visual_block_insert_round_off() | |
1313 new | |
1314 " The number of characters are tuned to fill a 4096 byte allocated block, | |
1315 " so that valgrind reports going over the end. | |
1316 call setline(1, ['xxxxx', repeat('0', 1350), "\t", repeat('x', 60)]) | |
1317 exe "normal gg0\<C-V>GI" .. repeat('0', 1320) .. "\<Esc>" | |
1318 bwipe! | |
1319 endfunc | |
1320 | |
1312 | 1321 |
1313 " vim: shiftwidth=2 sts=2 expandtab | 1322 " vim: shiftwidth=2 sts=2 expandtab |