mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.2245: third character of 'listchars' tab shows in wrong place
Problem: Third character of 'listchars' tab shows in wrong place when
'breakindent' is set.
Solution: Set c_final to NUL. (Naruhiko Nishino, closes vim/vim#5165)
2f7b7b1e12
This commit is contained in:
parent
e22d0cf12c
commit
9d826700f7
@ -2976,6 +2976,7 @@ win_line (
|
||||
}
|
||||
p_extra = NULL;
|
||||
c_extra = ' ';
|
||||
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) {
|
||||
@ -3293,9 +3294,7 @@ win_line (
|
||||
} else {
|
||||
int c0;
|
||||
|
||||
if (p_extra_free != NULL) {
|
||||
XFREE_CLEAR(p_extra_free);
|
||||
}
|
||||
|
||||
// Get a character from the line itself.
|
||||
c0 = c = *ptr;
|
||||
|
@ -297,6 +297,46 @@ function Test_breakindent16()
|
||||
call s:close_windows()
|
||||
endfunction
|
||||
|
||||
func Test_breakindent17_vartabs()
|
||||
if !has("vartabs")
|
||||
return
|
||||
endif
|
||||
let s:input = ""
|
||||
call s:test_windows('setl breakindent list listchars=tab:<-> showbreak=+++')
|
||||
call setline(1, "\t" . repeat('a', 63))
|
||||
vert resize 30
|
||||
norm! 1gg$
|
||||
redraw!
|
||||
let lines = s:screen_lines(1, 30)
|
||||
let expect = [
|
||||
\ "<-->aaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
\ " +++aaaaaaaaaaaaaaaaaaaaaaa",
|
||||
\ " +++aaaaaaaaaaaaaa ",
|
||||
\ ]
|
||||
call s:compare_lines(expect, lines)
|
||||
call s:close_windows('set breakindent& list& listchars& showbreak&')
|
||||
endfunc
|
||||
|
||||
func Test_breakindent18_vartabs()
|
||||
if !has("vartabs")
|
||||
return
|
||||
endif
|
||||
let s:input = ""
|
||||
call s:test_windows('setl breakindent list listchars=tab:<->')
|
||||
call setline(1, "\t" . repeat('a', 63))
|
||||
vert resize 30
|
||||
norm! 1gg$
|
||||
redraw!
|
||||
let lines = s:screen_lines(1, 30)
|
||||
let expect = [
|
||||
\ "<-->aaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
\ " aaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
\ " aaaaaaaaaaa ",
|
||||
\ ]
|
||||
call s:compare_lines(expect, lines)
|
||||
call s:close_windows('set breakindent& list& listchars&')
|
||||
endfunc
|
||||
|
||||
func Test_breakindent19_sbr_nextpage()
|
||||
let s:input = ""
|
||||
call s:test_windows('setl breakindent briopt=shift:2,sbr,min:18 sbr=>')
|
||||
|
Loading…
Reference in New Issue
Block a user