diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-10-12 06:49:11 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-10-12 07:02:49 +0800 |
commit | dac79b165dfc3a576b3b33d82b9c5edae7b6ebd8 (patch) | |
tree | ea3f18c80fc50c29d625d71e3b369651c903132d /test | |
parent | 7474874baa3ea960fab38b66db36870b797afd5b (diff) | |
download | rneovim-dac79b165dfc3a576b3b33d82b9c5edae7b6ebd8.tar.gz rneovim-dac79b165dfc3a576b3b33d82b9c5edae7b6ebd8.tar.bz2 rneovim-dac79b165dfc3a576b3b33d82b9c5edae7b6ebd8.zip |
vim-patch:9.0.2017: linebreak applies for leading whitespace
Problem: linebreak applies for leading whitespace
Solution: only apply linebreak, once we have found non-breakat chars in
the line
closes: vim/vim#13228
closes: vim/vim#13243
https://github.com/vim/vim/commit/dd75fcfbdff1934c6e531b5a89ebc636318bf4a2
Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_listlbr.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/old/testdir/test_listlbr.vim b/test/old/testdir/test_listlbr.vim index 9b9bf63864..6dea94fbf1 100644 --- a/test/old/testdir/test_listlbr.vim +++ b/test/old/testdir/test_listlbr.vim @@ -373,4 +373,19 @@ func Test_ctrl_char_on_wrap_column() call s:close_windows() endfunc +func Test_linebreak_no_break_after_whitespace_only() + call s:test_windows('setl ts=4 linebreak wrap') + call setline(1, "\tabcdefghijklmnopqrstuvwxyz" .. + \ "abcdefghijklmnopqrstuvwxyz") + let lines = s:screen_lines([1, 4], winwidth(0)) + let expect = [ +\ " abcdefghijklmnop", +\ "qrstuvwxyzabcdefghij", +\ "klmnopqrstuvwxyz ", +\ "~ ", +\ ] + call s:compare_lines(expect, lines) + call s:close_windows() +endfunc + " vim: shiftwidth=2 sts=2 expandtab |