summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_breakindent.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-23 19:59:22 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-23 19:59:22 +0100
commitdfede9a70b3136988a8f262742101ad5cb98f46d (patch)
tree7274266f12167dfe2ff671b2faa4be166abccda3 /src/testdir/test_breakindent.vim
parent2c02d3843a103826a3eb44357eaab09b7deb256b (diff)
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are setv8.2.0146
Problem: Wrong indent when 'showbreak' and 'breakindent' are set and 'briopt' includes "sbr". Solution: Reset "need_showbreak" where needed. (Ken Takata, closes #5523)
Diffstat (limited to 'src/testdir/test_breakindent.vim')
-rw-r--r--src/testdir/test_breakindent.vim26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/testdir/test_breakindent.vim b/src/testdir/test_breakindent.vim
index ee61cbc9db..f7cfb4e90b 100644
--- a/src/testdir/test_breakindent.vim
+++ b/src/testdir/test_breakindent.vim
@@ -658,3 +658,29 @@ func Test_breakindent18_vartabs()
call s:close_windows('set breakindent& list& listchars&')
endfunc
+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