mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07: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;
|
||||
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',
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user