diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-03-03 11:26:22 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-03 11:26:22 +0800 |
| commit | 1dd2424b126f507402840321df012dbd94739044 (patch) | |
| tree | c9700aac55f588c1a4fe4cdd3097d7b2c78ea85a /src/nvim/testdir | |
| parent | 361de6d54d41fc0fc8f8a89ec779696f3f7bb46e (diff) | |
| parent | bcf077414cf6f1a5701d68f848320008d6d89919 (diff) | |
| download | rneovim-1dd2424b126f507402840321df012dbd94739044.tar.gz rneovim-1dd2424b126f507402840321df012dbd94739044.tar.bz2 rneovim-1dd2424b126f507402840321df012dbd94739044.zip | |
Merge pull request #22488 from zeertzjq/vim-9.0.1373
vim-patch:9.0.{0690,0691,0991,1373}: listchars fixes
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_breakindent.vim | 18 | ||||
| -rw-r--r-- | src/nvim/testdir/test_listlbr.vim | 24 |
2 files changed, 42 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_breakindent.vim b/src/nvim/testdir/test_breakindent.vim index 2e377aa434..b61c9a570d 100644 --- a/src/nvim/testdir/test_breakindent.vim +++ b/src/nvim/testdir/test_breakindent.vim @@ -1075,4 +1075,22 @@ func Test_breakindent_column() bwipeout! endfunc +func Test_linebreak_list() + " This was setting wlv.c_extra to NUL while wlv.p_extra is NULL + filetype plugin on + syntax enable + edit! $VIMRUNTIME/doc/index.txt + /v_P + + setlocal list + setlocal listchars=tab:>- + setlocal linebreak + setlocal nowrap + setlocal filetype=help + redraw! + + bwipe! +endfunc + + " vim: shiftwidth=2 sts=2 expandtab 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)) |