diff options
| author | h-east <h.east.727@gmail.com> | 2023-03-02 18:49:09 +0000 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2023-03-02 18:49:09 +0000 |
| commit | 194555c001f2b8576483ef34511450b6e9b5e3fd (patch) | |
| tree | 47cada172948f112665c54bd0b3e056ca831c911 /src/testdir | |
| parent | db1887ce40452daea8c4e8734ec64202e5f24130 (diff) | |
| download | vim-git-9.0.1373.tar.gz | |
patch 9.0.1373: wrong text displayed when using both 'linebreak' and 'list'v9.0.1373
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 #12065)
Diffstat (limited to 'src/testdir')
| -rw-r--r-- | src/testdir/test_listlbr.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/testdir/test_listlbr.vim b/src/testdir/test_listlbr.vim index 4a43feab7..198ad8c7f 100644 --- a/src/testdir/test_listlbr.vim +++ b/src/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)) |
