comparison src/testdir/test_visual.vim @ 31680:24d9c23bf665 v9.0.1172

patch 9.0.1172: when 'selection' is "exclusive" then "1v" is one char short Commit: https://github.com/vim/vim/commit/79c11e399be3d96ed6d1c7458b1380e878ec717b Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 10 17:29:29 2023 +0000 patch 9.0.1172: when 'selection' is "exclusive" then "1v" is one char short Problem: When 'selection' is "exclusive" then "1v" is one char short. Solution: Add one character when 'selection' is "exclusive. (closes https://github.com/vim/vim/issues/11791)
author Bram Moolenaar <Bram@vim.org>
date Tue, 10 Jan 2023 18:30:04 +0100
parents 360f286b5869
children dbec60b8c253
comparison
equal deleted inserted replaced
31679:ba5b5ed7d62c 31680:24d9c23bf665
1334 source XvisualReselect 1334 source XvisualReselect
1335 1335
1336 bwipe! 1336 bwipe!
1337 endfunc 1337 endfunc
1338 1338
1339 func Test_visual_reselect_exclusive()
1340 new
1341 call setline(1, ['abcde', 'abcde'])
1342 set selection=exclusive
1343 normal 1G0viwd
1344 normal 2G01vd
1345 call assert_equal(['', ''], getline(1, 2))
1346
1347 set selection&
1348 bwipe!
1349 endfunc
1350
1339 func Test_visual_block_insert_round_off() 1351 func Test_visual_block_insert_round_off()
1340 new 1352 new
1341 " The number of characters are tuned to fill a 4096 byte allocated block, 1353 " The number of characters are tuned to fill a 4096 byte allocated block,
1342 " so that valgrind reports going over the end. 1354 " so that valgrind reports going over the end.
1343 call setline(1, ['xxxxx', repeat('0', 1350), "\t", repeat('x', 60)]) 1355 call setline(1, ['xxxxx', repeat('0', 1350), "\t", repeat('x', 60)])