From 376fa27237d0a1ce5ef9967473920ac7d68fcf29 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 23 Jan 2020 19:11:32 -0500 Subject: vim-patch:8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set Problem: Wrong indent when 'showbreak' and 'breakindent' are set and 'briopt' includes "sbr". Solution: Reset "need_showbreak" where needed. (Ken Takata, closes vim/vim#5523) https://github.com/vim/vim/commit/dfede9a70b3136988a8f262742101ad5cb98f46d --- src/nvim/testdir/test_breakindent.vim | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_breakindent.vim b/src/nvim/testdir/test_breakindent.vim index 4b34420cab..9717043976 100644 --- a/src/nvim/testdir/test_breakindent.vim +++ b/src/nvim/testdir/test_breakindent.vim @@ -296,3 +296,30 @@ function Test_breakindent16() call s:compare_lines(expect, lines) call s:close_windows() endfunction + +func Test_breakindent19_sbr_nextpage() + let s:input = "" + call s:test_windows('setl breakindent briopt=shift:2,sbr,min:18 sbr=>') + call setline(1, repeat('a', 200)) + norm! 1gg + redraw! + let lines = s:screen_lines(1, 20) + let expect = [ + \ "aaaaaaaaaaaaaaaaaaaa", + \ "> aaaaaaaaaaaaaaaaaa", + \ "> aaaaaaaaaaaaaaaaaa", + \ ] + call s:compare_lines(expect, lines) + " Scroll down one screen line + setl scrolloff=5 + norm! 5gj + redraw! + let lines = s:screen_lines(1, 20) + let expect = [ + \ "> aaaaaaaaaaaaaaaaaa", + \ "> aaaaaaaaaaaaaaaaaa", + \ "> aaaaaaaaaaaaaaaaaa", + \ ] + call s:compare_lines(expect, lines) + call s:close_windows('set breakindent& briopt& sbr&') +endfunc -- cgit