Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim @@ -2,6 +2,7 @@ source shared.vim source check.vim +source screendump.vim func Test_block_shift_multibyte() " Uses double-wide character. @@ -1241,5 +1242,25 @@ func Test_visual_put_blockedit_zy_and_zp bw! endfunc +func Test_visual_block_with_virtualedit() + CheckScreendump + + let lines =<< trim END + call setline(1, ['aaaaaa', 'bbbb', 'cc']) + set virtualedit=block + normal G + END + call writefile(lines, 'XTest_block') + + let buf = RunVimInTerminal('-S XTest_block', {'rows': 8, 'cols': 50}) + call term_sendkeys(buf, "\<C-V>gg$") + call VerifyScreenDump(buf, 'Test_visual_block_with_virtualedit', {}) + + " clean up + call term_sendkeys(buf, "\<Esc>") + call StopVimInTerminal(buf) + call delete('XTest_beval') +endfunc + " vim: shiftwidth=2 sts=2 expandtab