comparison src/testdir/test_visual.vim @ 25102:b7062becbfb5 v8.2.3088

patch 8.2.3088: with 'virtualedit' set to "block" Visual highlight is wrong Commit: https://github.com/vim/vim/commit/9cee4a1c9c69542ccd73bcd2db05920150856361 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 3 15:08:37 2021 +0200 patch 8.2.3088: with 'virtualedit' set to "block" Visual highlight is wrong Problem: With 'virtualedit' set to "block" Visual highlight is wrong after using "$". (Marco Trosi) Solution: Do not set w_old_cursor_lcol to MAXCOL. (closes #8495)
author Bram Moolenaar <Bram@vim.org>
date Sat, 03 Jul 2021 15:15:03 +0200
parents bd46322bea66
children 56817e74d106
comparison
equal deleted inserted replaced
25101:c23effd03e80 25102:b7062becbfb5
1 " Tests for various Visual modes. 1 " Tests for various Visual modes.
2 2
3 source shared.vim 3 source shared.vim
4 source check.vim 4 source check.vim
5 source screendump.vim
5 6
6 func Test_block_shift_multibyte() 7 func Test_block_shift_multibyte()
7 " Uses double-wide character. 8 " Uses double-wide character.
8 split 9 split
9 call setline(1, ['xヹxxx', 'ヹxxx']) 10 call setline(1, ['xヹxxx', 'ヹxxx'])
1239 call assert_equal(['aa', 'bbbbb', 'ccc', '', 'aaXX', 'bbbbbGGHHJ', 'cccRTZU'], getline(1, 7)) 1240 call assert_equal(['aa', 'bbbbb', 'ccc', '', 'aaXX', 'bbbbbGGHHJ', 'cccRTZU'], getline(1, 7))
1240 set ve&vim 1241 set ve&vim
1241 bw! 1242 bw!
1242 endfunc 1243 endfunc
1243 1244
1245 func Test_visual_block_with_virtualedit()
1246 CheckScreendump
1247
1248 let lines =<< trim END
1249 call setline(1, ['aaaaaa', 'bbbb', 'cc'])
1250 set virtualedit=block
1251 normal G
1252 END
1253 call writefile(lines, 'XTest_block')
1254
1255 let buf = RunVimInTerminal('-S XTest_block', {'rows': 8, 'cols': 50})
1256 call term_sendkeys(buf, "\<C-V>gg$")
1257 call VerifyScreenDump(buf, 'Test_visual_block_with_virtualedit', {})
1258
1259 " clean up
1260 call term_sendkeys(buf, "\<Esc>")
1261 call StopVimInTerminal(buf)
1262 call delete('XTest_beval')
1263 endfunc
1264
1244 1265
1245 " vim: shiftwidth=2 sts=2 expandtab 1266 " vim: shiftwidth=2 sts=2 expandtab