diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-21 07:18:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-21 07:18:39 +0800 |
commit | d21e6285e93302b6d387ad6d362b683db09c5239 (patch) | |
tree | 9e7fdb16e80ab4b8e7c3ca002168870fa1ad471d /test/old/testdir | |
parent | 10459e1ed0fe6429b15705567135c55e0778b262 (diff) | |
download | rneovim-d21e6285e93302b6d387ad6d362b683db09c5239.tar.gz rneovim-d21e6285e93302b6d387ad6d362b683db09c5239.tar.bz2 rneovim-d21e6285e93302b6d387ad6d362b683db09c5239.zip |
vim-patch:9.0.1759: Visual highlight not working with cursor at end of screen line (#24806)
Problem: Visual highlight not working with cursor at end of screen line
and 'showbreak'.
Solution: Only update "vcol_prev" when drawing buffer text.
closes: vim/vim#12865
https://github.com/vim/vim/commit/8fc6a1dae07aa63faa6bfe6ed93888635745830c
Diffstat (limited to 'test/old/testdir')
-rw-r--r-- | test/old/testdir/test_visual.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/old/testdir/test_visual.vim b/test/old/testdir/test_visual.vim index 04282416bb..a12ecefc73 100644 --- a/test/old/testdir/test_visual.vim +++ b/test/old/testdir/test_visual.vim @@ -1558,5 +1558,23 @@ func Test_heap_buffer_overflow() set updatecount& endfunc +" Test Visual highlight with cursor at end of screen line and 'showbreak' +func Test_visual_hl_with_showbreak() + CheckScreendump + + let lines =<< trim END + setlocal showbreak=+ + call setline(1, repeat('a', &columns + 10)) + normal g$v4lo + END + call writefile(lines, 'XTest_visual_sbr', 'D') + + let buf = RunVimInTerminal('-S XTest_visual_sbr', {'rows': 6, 'cols': 50}) + call VerifyScreenDump(buf, 'Test_visual_hl_with_showbreak', {}) + + " clean up + call term_sendkeys(buf, "\<Esc>") + call StopVimInTerminal(buf) +endfunc " vim: shiftwidth=2 sts=2 expandtab |