diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-03-03 07:44:11 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2023-03-03 11:00:47 +0800 |
| commit | bcf077414cf6f1a5701d68f848320008d6d89919 (patch) | |
| tree | c9700aac55f588c1a4fe4cdd3097d7b2c78ea85a /src/nvim/testdir | |
| parent | 4a3594f60e854db56589f30cec4fc16c8a46fe30 (diff) | |
| download | rneovim-bcf077414cf6f1a5701d68f848320008d6d89919.tar.gz rneovim-bcf077414cf6f1a5701d68f848320008d6d89919.tar.bz2 rneovim-bcf077414cf6f1a5701d68f848320008d6d89919.zip | |
vim-patch:9.0.1373: wrong text displayed when using both 'linebreak' and 'list'
Problem: Wrong text displayed when using both 'linebreak' and 'list'.
Solution: Only set "c_extra" to NUL when "p_extra" is not empty. (Hirohito
Higashi, closes vim/vim#12065)
https://github.com/vim/vim/commit/194555c001f2b8576483ef34511450b6e9b5e3fd
Cherry-pick a change from patch 9.0.0153.
Co-authored-by: h-east <h.east.727@gmail.com>
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_listlbr.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_listlbr.vim b/src/nvim/testdir/test_listlbr.vim index 1cbdba5d76..a746779e73 100644 --- a/src/nvim/testdir/test_listlbr.vim +++ b/src/nvim/testdir/test_listlbr.vim @@ -73,6 +73,30 @@ func Test_linebreak_with_nolist() call s:close_windows() endfunc +func Test_linebreak_with_list_and_number() + call s:test_windows('setl list listchars+=tab:>-') + call setline(1, ["abcdefg\thijklmnopqrstu", "v"]) + let lines = s:screen_lines([1, 4], winwidth(0)) + let expect_nonumber = [ +\ "abcdefg>------------", +\ "hijklmnopqrstu$ ", +\ "v$ ", +\ "~ ", +\ ] + call s:compare_lines(expect_nonumber, lines) + + setl number + let lines = s:screen_lines([1, 4], winwidth(0)) + let expect_number = [ +\ " 1 abcdefg>--------", +\ " hijklmnopqrstu$ ", +\ " 2 v$ ", +\ "~ ", +\ ] + call s:compare_lines(expect_number, lines) + call s:close_windows() +endfunc + func Test_should_break() call s:test_windows('setl sbr=+ nolist') call setline(1, "1\t" . repeat('a', winwidth(0)-2)) |