mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.1299: "extends" from 'listchars' is used when 'list' is off
Problem: "extends" from 'listchars' is used when 'list' is off. (Hiroyuki
Yoshinaga)
Solution: Only use the "extends" character when 'list' is on. (Hirohito
Higashi, closes vim/vim#4360)
a5c6a0b6c7
This commit is contained in:
parent
924f1173cb
commit
98398ff93f
@ -3995,8 +3995,10 @@ win_line (
|
||||
break;
|
||||
}
|
||||
|
||||
// line continues beyond line end
|
||||
if (wp->w_p_lcs_chars.ext
|
||||
// Show "extends" character from 'listchars' if beyond the line end and
|
||||
// 'list' is set.
|
||||
if (wp->w_p_lcs_chars.ext != NUL
|
||||
&& wp->w_p_list
|
||||
&& !wp->w_p_wrap
|
||||
&& filler_todo <= 0
|
||||
&& (wp->w_p_rl ? col == 0 : col == grid->Columns - 1)
|
||||
|
@ -110,6 +110,25 @@ func Test_listchars()
|
||||
call cursor(1, 1)
|
||||
call assert_equal([expected], ScreenLines(1, virtcol('$')))
|
||||
|
||||
" test extends
|
||||
normal ggdG
|
||||
set listchars=extends:Z
|
||||
set nowrap
|
||||
set nolist
|
||||
call append(0, [ repeat('A', &columns + 1) ])
|
||||
|
||||
let expected = repeat('A', &columns)
|
||||
|
||||
redraw!
|
||||
call cursor(1, 1)
|
||||
call assert_equal([expected], ScreenLines(1, &columns))
|
||||
|
||||
set list
|
||||
let expected = expected[:-2] . 'Z'
|
||||
redraw!
|
||||
call cursor(1, 1)
|
||||
call assert_equal([expected], ScreenLines(1, &columns))
|
||||
|
||||
enew!
|
||||
set listchars& ff&
|
||||
endfunc
|
||||
|
Loading…
Reference in New Issue
Block a user