mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
393dc2b0f5
commit
801c8e06d6
@ -2994,7 +2994,7 @@ win_line (
|
|||||||
c_final = NUL;
|
c_final = NUL;
|
||||||
n_extra =
|
n_extra =
|
||||||
get_breakindent_win(wp, ml_get_buf(wp->w_buffer, lnum, false));
|
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;
|
need_showbreak = false;
|
||||||
}
|
}
|
||||||
// Correct end of highlighted area for 'breakindent',
|
// Correct end of highlighted area for 'breakindent',
|
||||||
|
@ -361,5 +361,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
|
||||||
|
Loading…
Reference in New Issue
Block a user