mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
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 #4360)
This commit is contained in:
@@ -5594,8 +5594,10 @@ win_line(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* line continues beyond line end */
|
// Show "extends" character from 'listchars' if beyond the line end and
|
||||||
if (lcs_ext
|
// 'list' is set.
|
||||||
|
if (lcs_ext != NUL
|
||||||
|
&& wp->w_p_list
|
||||||
&& !wp->w_p_wrap
|
&& !wp->w_p_wrap
|
||||||
#ifdef FEAT_DIFF
|
#ifdef FEAT_DIFF
|
||||||
&& filler_todo <= 0
|
&& filler_todo <= 0
|
||||||
|
@@ -110,6 +110,25 @@ func Test_listchars()
|
|||||||
call cursor(1, 1)
|
call cursor(1, 1)
|
||||||
call assert_equal([expected], ScreenLines(1, virtcol('$')))
|
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!
|
enew!
|
||||||
set listchars& ff&
|
set listchars& ff&
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -767,6 +767,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 */
|
||||||
|
/**/
|
||||||
|
1299,
|
||||||
/**/
|
/**/
|
||||||
1298,
|
1298,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user