diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-20 18:12:54 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-08-20 18:12:54 +0200 |
commit | 8fc6a1dae07aa63faa6bfe6ed93888635745830c (patch) | |
tree | 4324dfaf69a1081379f8cd4b5b8076887a99a586 /src/testdir/test_visual.vim | |
parent | 0ffc17aa479867f6f3ee14a46cf71352f126b5ba (diff) |
patch 9.0.1759: Visual highlight not working with cursor at end of screen linev9.0.1759
Problem: Visual highlight not working with cursor at end of screen line
and 'showbreak'.
Solution: Only update "vcol_prev" when drawing buffer text.
closes: #12865
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Diffstat (limited to 'src/testdir/test_visual.vim')
-rw-r--r-- | src/testdir/test_visual.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim index f152e7b79b..58b7392947 100644 --- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim @@ -1554,5 +1554,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 |