diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2024-02-10 06:53:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-10 06:53:10 +0800 |
| commit | 0d4d3e4325d475e62ff793391e4aba3c7c8561ee (patch) | |
| tree | 3e3ea7d19b94bd16c2672d779f3bb36b201cd3d9 /test/old/testdir | |
| parent | 44ec4b5b18d1ba856dc3305d8dfb0e8d9507dd50 (diff) | |
| download | rneovim-0d4d3e4325d475e62ff793391e4aba3c7c8561ee.tar.gz rneovim-0d4d3e4325d475e62ff793391e4aba3c7c8561ee.tar.bz2 rneovim-0d4d3e4325d475e62ff793391e4aba3c7c8561ee.zip | |
vim-patch:9.1.0084: Visual hl wrong when it ends before multibyte 'showbreak' (#27404)
Problem: Visual hl wrong when it ends before multibyte 'showbreak'.
(lacygoil)
Solution: Use vcol_sbr instead of adding n_extra.
(zeertzjq)
fixes: vim/vim#11272
closes: vim/vim#13996
https://github.com/vim/vim/commit/df23d7f4bd7546f3152ea003856525591218565b
Bug doesn't apply to Nvim.
Diffstat (limited to 'test/old/testdir')
| -rw-r--r-- | test/old/testdir/test_listlbr_utf8.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/old/testdir/test_listlbr_utf8.vim b/test/old/testdir/test_listlbr_utf8.vim index 1bbbd2d2ae..313ff30cc4 100644 --- a/test/old/testdir/test_listlbr_utf8.vim +++ b/test/old/testdir/test_listlbr_utf8.vim @@ -9,6 +9,7 @@ CheckFeature conceal CheckFeature signs source view_util.vim +source screendump.vim func s:screen_lines(lnum, width) abort return ScreenLines(a:lnum, a:width) @@ -358,4 +359,24 @@ func Test_unprintable_char_on_wrap_column() call s:close_windows() endfunc +" Test that Visual selection is drawn correctly when 'linebreak' is set and +" selection ends before multibyte 'showbreak'. +func Test_visual_ends_before_showbreak() + CheckScreendump + + let lines =<< trim END + vim9script + &wrap = true + &linebreak = true + &showbreak = '↪ ' + ['xxxxx ' .. 'y'->repeat(&columns - 6) .. ' zzzz']->setline(1) + normal! wvel + END + call writefile(lines, 'XvisualEndsBeforeShowbreak', 'D') + let buf = RunVimInTerminal('-S XvisualEndsBeforeShowbreak', #{rows: 6}) + call VerifyScreenDump(buf, 'Test_visual_ends_before_showbreak', {}) + + call StopVimInTerminal(buf) +endfunc + " vim: shiftwidth=2 sts=2 expandtab |
