mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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)
This commit is contained in:
@@ -1176,7 +1176,7 @@ win_line(
|
|||||||
c_final = NUL;
|
c_final = NUL;
|
||||||
n_extra = get_breakindent_win(wp,
|
n_extra = get_breakindent_win(wp,
|
||||||
ml_get_buf(wp->w_buffer, lnum, FALSE));
|
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;
|
need_showbreak = FALSE;
|
||||||
// Correct end of highlighted area for 'breakindent',
|
// Correct end of highlighted area for 'breakindent',
|
||||||
// required when 'linebreak' is also set.
|
// required when 'linebreak' is also set.
|
||||||
|
@@ -682,5 +682,15 @@ func Test_breakindent19_sbr_nextpage()
|
|||||||
\ "> aaaaaaaaaaaaaaaaaa",
|
\ "> aaaaaaaaaaaaaaaaaa",
|
||||||
\ ]
|
\ ]
|
||||||
call s:compare_lines(expect, lines)
|
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&')
|
call s:close_windows('set breakindent& briopt& sbr&')
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -738,6 +738,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
308,
|
||||||
/**/
|
/**/
|
||||||
307,
|
307,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user