File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1176,6 +1176,8 @@ 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 )
1180+ need_showbreak = FALSE;
11791181 // Correct end of highlighted area for 'breakindent',
11801182 // required when 'linebreak' is also set.
11811183 if (tocol == vcol )
@@ -1222,7 +1224,8 @@ win_line(
12221224 c_extra = NUL ;
12231225 c_final = NUL ;
12241226 n_extra = (int )STRLEN (sbr );
1225- need_showbreak = FALSE;
1227+ if (wp -> w_skipcol == 0 || !wp -> w_p_wrap )
1228+ need_showbreak = FALSE;
12261229 vcol_sbr = vcol + MB_CHARLEN (sbr );
12271230 // Correct end of highlighted area for 'showbreak',
12281231 // required when 'linebreak' is also set.
Original file line number Diff line number Diff line change @@ -658,3 +658,29 @@ func Test_breakindent18_vartabs()
658658 call s: close_windows (' set breakindent& list& listchars&' )
659659endfunc
660660
661+ func Test_breakindent19_sbr_nextpage ()
662+ let s: input = " "
663+ call s: test_windows (' setl breakindent briopt=shift:2,sbr,min:18 sbr=>' )
664+ call setline (1 , repeat (' a' , 200 ))
665+ norm! 1 gg
666+ redraw !
667+ let lines = s: screen_lines (1 , 20 )
668+ let expect = [
669+ \ " aaaaaaaaaaaaaaaaaaaa" ,
670+ \ " > aaaaaaaaaaaaaaaaaa" ,
671+ \ " > aaaaaaaaaaaaaaaaaa" ,
672+ \ ]
673+ call s: compare_lines (expect, lines )
674+ " Scroll down one screen line
675+ setl scrolloff = 5
676+ norm! 5 gj
677+ redraw !
678+ let lines = s: screen_lines (1 , 20 )
679+ let expect = [
680+ \ " > aaaaaaaaaaaaaaaaaa" ,
681+ \ " > aaaaaaaaaaaaaaaaaa" ,
682+ \ " > aaaaaaaaaaaaaaaaaa" ,
683+ \ ]
684+ call s: compare_lines (expect, lines )
685+ call s: close_windows (' set breakindent& briopt& sbr&' )
686+ endfunc
Original file line number Diff line number Diff line change @@ -742,6 +742,8 @@ static char *(features[]) =
742742
743743static int included_patches [] =
744744{ /* Add new patch number below this line */
745+ /**/
746+ 146 ,
745747/**/
746748 145 ,
747749/**/
You can’t perform that action at this time.
0 commit comments