aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-01-23 19:11:32 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-01-23 19:31:11 -0500
commit376fa27237d0a1ce5ef9967473920ac7d68fcf29 (patch)
tree029c6e675516d6c1f30a24724b895ee3a6b37f99 /src/nvim/testdir
parent71ee46accfd235bad2b8460065100b31bb2d8165 (diff)
downloadrneovim-376fa27237d0a1ce5ef9967473920ac7d68fcf29.tar.gz
rneovim-376fa27237d0a1ce5ef9967473920ac7d68fcf29.tar.bz2
rneovim-376fa27237d0a1ce5ef9967473920ac7d68fcf29.zip
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
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_breakindent.vim27
1 files changed, 27 insertions, 0 deletions
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