diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-07-03 23:06:30 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-07-04 09:22:50 -0400 |
| commit | 37959e88654c6b8e49de493231f6ff780adab67c (patch) | |
| tree | 84d7b37cac5ca45adab8d016670fecc949cd63d6 /src/nvim/testdir | |
| parent | c2a7e445ce6652e986b2018c62cc1d54a9691b29 (diff) | |
| download | rneovim-37959e88654c6b8e49de493231f6ff780adab67c.tar.gz rneovim-37959e88654c6b8e49de493231f6ff780adab67c.tar.bz2 rneovim-37959e88654c6b8e49de493231f6ff780adab67c.zip | |
vim-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 vim/vim#8495)
https://github.com/vim/vim/commit/9cee4a1c9c69542ccd73bcd2db05920150856361
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_visual.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim index b7c5717bd2..9c62bdb16e 100644 --- a/src/nvim/testdir/test_visual.vim +++ b/src/nvim/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. @@ -1082,5 +1083,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 |