Skip to content

Commit 1aa76b8

Browse files
committed
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 #5523, closes #5684)
1 parent 026270c commit 1aa76b8

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

src/drawline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ win_line(
11761176
c_final = NUL;
11771177
n_extra = get_breakindent_win(wp,
11781178
ml_get_buf(wp->w_buffer, lnum, FALSE));
1179-
if (wp->w_skipcol > 0 && wp->w_p_wrap)
1179+
if (wp->w_skipcol > 0 && wp->w_p_wrap && wp->w_p_brisbr)
11801180
need_showbreak = FALSE;
11811181
// Correct end of highlighted area for 'breakindent',
11821182
// required when 'linebreak' is also set.

src/testdir/test_breakindent.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,5 +682,15 @@ func Test_breakindent19_sbr_nextpage()
682682
\ "> aaaaaaaaaaaaaaaaaa",
683683
\ ]
684684
call s:compare_lines(expect, lines)
685+
686+
setl breakindent briopt=min:18 sbr=>
687+
norm! 5gj
688+
let lines = s:screen_lines(1, 20)
689+
let expect = [
690+
\ ">aaaaaaaaaaaaaaaaaaa",
691+
\ ">aaaaaaaaaaaaaaaaaaa",
692+
\ ">aaaaaaaaaaaaaaaaaaa",
693+
\ ]
694+
call s:compare_lines(expect, lines)
685695
call s:close_windows('set breakindent& briopt& sbr&')
686696
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
308,
741743
/**/
742744
307,
743745
/**/

0 commit comments

Comments
 (0)