vim-patch:8.2.0308: 'showbreak' does not work for a very long line

Problem:    'showbreak' does not work for a very long line. (John Little)
Solution:   Check whether 'briopt' contains "sbr". (Ken Takata, closes vim/vim#5523,
            closes vim/vim#5684)
1aa76b8fd0
This commit is contained in:
Jan Edmund Lazo 2020-05-10 23:21:43 -04:00
parent 393dc2b0f5
commit 801c8e06d6
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15
2 changed files with 11 additions and 1 deletions

View File

@ -2994,7 +2994,7 @@ win_line (
c_final = NUL;
n_extra =
get_breakindent_win(wp, ml_get_buf(wp->w_buffer, lnum, false));
if (wp->w_skipcol > 0 && wp->w_p_wrap) {
if (wp->w_skipcol > 0 && wp->w_p_wrap && wp->w_p_brisbr) {
need_showbreak = false;
}
// Correct end of highlighted area for 'breakindent',

View File

@ -361,5 +361,15 @@ func Test_breakindent19_sbr_nextpage()
\ "> aaaaaaaaaaaaaaaaaa",
\ ]
call s:compare_lines(expect, lines)
setl breakindent briopt=min:18 sbr=>
norm! 5gj
let lines = s:screen_lines(1, 20)
let expect = [
\ ">aaaaaaaaaaaaaaaaaaa",
\ ">aaaaaaaaaaaaaaaaaaa",
\ ">aaaaaaaaaaaaaaaaaaa",
\ ]
call s:compare_lines(expect, lines)
call s:close_windows('set breakindent& briopt& sbr&')
endfunc