diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2021-09-10 08:43:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-10 08:43:45 -0700 |
| commit | 7525052270c4c5e62b9b5bc7dbc20b851f986900 (patch) | |
| tree | 2e29d778af83871bed859d1301ecdd1bb09979cb /src/nvim/testdir | |
| parent | 0dcfd0e8d101389fb6a33a7e887114ea0c062648 (diff) | |
| parent | 36aff87ab6a043a31c13daf4522843498b98c93f (diff) | |
| download | rneovim-7525052270c4c5e62b9b5bc7dbc20b851f986900.tar.gz rneovim-7525052270c4c5e62b9b5bc7dbc20b851f986900.tar.bz2 rneovim-7525052270c4c5e62b9b5bc7dbc20b851f986900.zip | |
Merge #15626 vim-patch:8.1.{2281,2283},8.2.{2903,3391,3397}
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_breakindent.vim | 25 | ||||
| -rw-r--r-- | src/nvim/testdir/test_display.vim | 18 | ||||
| -rw-r--r-- | src/nvim/testdir/test_highlight.vim | 2 |
3 files changed, 43 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_breakindent.vim b/src/nvim/testdir/test_breakindent.vim index 5542746a04..97b570e64f 100644 --- a/src/nvim/testdir/test_breakindent.vim +++ b/src/nvim/testdir/test_breakindent.vim @@ -67,7 +67,8 @@ endfunc func Test_breakindent02() " simple breakindent test with showbreak set - call s:test_windows('setl briopt=min:0 sbr=>>') + set sbr=>> + call s:test_windows('setl briopt=min:0 sbr=') let lines = s:screen_lines(line('.'),8) let expect = [ \ " abcd", @@ -127,7 +128,8 @@ endfunc func Test_breakindent04() " breakindent set with min width 18 - call s:test_windows('setl sbr= briopt=min:18') + set sbr=<<< + call s:test_windows('setl sbr=NONE briopt=min:18') let lines = s:screen_lines(line('.'),8) let expect = [ \ " abcd", @@ -137,6 +139,7 @@ func Test_breakindent04() call s:compare_lines(expect, lines) " clean up call s:close_windows('set sbr=') + set sbr= endfunc func Test_breakindent04_vartabs() @@ -868,4 +871,22 @@ func Test_breakindent20_list() call s:close_windows('set breakindent& briopt& linebreak& list& listchars& showbreak&') endfunc +" The following used to crash Vim. This is fixed by 8.2.3391. +" This is a regression introduced by 8.2.2903. +func Test_window_resize_with_linebreak() + new + 53vnew + set linebreak + set showbreak=>> + set breakindent + set breakindentopt=shift:4 + call setline(1, "\naaaaaaaaa\n\na\naaaaa\n¯aaaaaaaaaa\naaaaaaaaaaaa\naaa\n\"a:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - aaaaaaaa\"\naaaaaaaa\n\"a") + redraw! + call assert_equal([" >>aa^@\"a: "], ScreenLines(2, 14)) + vertical resize 52 + redraw! + call assert_equal([" >>aaa^@\"a:"], ScreenLines(2, 14)) + %bw! +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim index c702b44b88..12327f34d6 100644 --- a/src/nvim/testdir/test_display.vim +++ b/src/nvim/testdir/test_display.vim @@ -262,3 +262,21 @@ func Test_display_scroll_at_topline() call StopVimInTerminal(buf) endfunc + +func Test_display_linebreak_breakat() + new + vert resize 25 + let _breakat = &breakat + setl signcolumn=yes linebreak breakat=) showbreak=+\ + call setline(1, repeat('x', winwidth(0) - 2) .. ')abc') + let lines = ScreenLines([1, 2], 25) + let expected = [ + \ ' xxxxxxxxxxxxxxxxxxxxxxx', + \ ' + )abc ' + \ ] + call assert_equal(expected, lines) + %bw! + let &breakat=_breakat +endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_highlight.vim b/src/nvim/testdir/test_highlight.vim index 24c9c3580e..6fd9477ce9 100644 --- a/src/nvim/testdir/test_highlight.vim +++ b/src/nvim/testdir/test_highlight.vim @@ -426,6 +426,7 @@ func Test_highlight_eol_with_cursorline_breakindent() let [hiCursorLine, hi_ul, hi_bg] = HiCursorLine() call NewWindow('topleft 5', 10) + set showbreak=xxx setlocal breakindent breakindentopt=min:0,shift:1 showbreak=> call setline(1, ' ' . repeat('a', 9) . 'bcd') call matchadd('Search', '\n') @@ -483,6 +484,7 @@ func Test_highlight_eol_with_cursorline_breakindent() call CloseWindow() set showbreak= + setlocal showbreak= exe hiCursorLine endfunc |