forked from aniani/vim
patch 9.1.1130: 'listchars' "precedes" is not drawn on Tabs.
Problem: 'listchars' "precedes" is not drawn on Tabs. Solution: Only draw 'listchars' "precedes" when not skipping over cells. (zeertzjq) fixes: #5927 closes: #16691 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
3cb41489dc
commit
13f100e932
@ -3727,6 +3727,7 @@ win_line(
|
|||||||
&& wlv.filler_todo <= 0
|
&& wlv.filler_todo <= 0
|
||||||
#endif
|
#endif
|
||||||
&& wlv.draw_state > WL_NR
|
&& wlv.draw_state > WL_NR
|
||||||
|
&& skip_cells <= 0
|
||||||
&& c != NUL)
|
&& c != NUL)
|
||||||
{
|
{
|
||||||
c = wp->w_lcs_chars.prec;
|
c = wp->w_lcs_chars.prec;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|<+0#4040ff13#ffff4012| +0#0000001&@73
|
|<+0#4040ff13#ffff4012| +0#0000001&@73
|
||||||
|-+0#0000e05&@2|>|-@6>s+0#0000001&|o|m|e|.+0#0000e05&|r+0#0000001&|a|n|d|o|m|.+0#0000e05&|*+0#e0e0e08#6c6c6c255|.+0#0000e05#ffff4012|e+0#0000001&|n|o|u|g|h|.+0#0000e05&|l+0#0000001&|o|n|g|.+0#0000e05&|t+0#0000001&|o|.+0#0000e05&|s+0#0000001&|h|o|w|.+0#0000e05&|'+0#0000001&|e|x|t|e|n|d|s|'|.+0#0000e05&|a+0#0000001&|n|d|.+0#0000e05&|'+0#0000001&|p|r|e|c|e|d|e|s|'|.+0#0000e05&|i+0#0000001&|n|c|l|>+0#4040ff13&
|
|<+0#4040ff13&|-+0#0000e05&@1|>|-@6>s+0#0000001&|o|m|e|.+0#0000e05&|r+0#0000001&|a|n|d|o|m|.+0#0000e05&|*+0#e0e0e08#6c6c6c255|.+0#0000e05#ffff4012|e+0#0000001&|n|o|u|g|h|.+0#0000e05&|l+0#0000001&|o|n|g|.+0#0000e05&|t+0#0000001&|o|.+0#0000e05&|s+0#0000001&|h|o|w|.+0#0000e05&|'+0#0000001&|e|x|t|e|n|d|s|'|.+0#0000e05&|a+0#0000001&|n|d|.+0#0000e05&|'+0#0000001&|p|r|e|c|e|d|e|s|'|.+0#0000e05&|i+0#0000001&|n|c|l|>+0#4040ff13&
|
||||||
|<| +0#0000001&@73
|
|<| +0#0000001&@73
|
||||||
|~+0#4040ff13&| @73
|
|~+0#4040ff13&| @73
|
||||||
|~| @73
|
|~| @73
|
||||||
|
@ -677,6 +677,7 @@ func Test_listchars_precedes_with_wide_char()
|
|||||||
call setline(1, '123口456')
|
call setline(1, '123口456')
|
||||||
call assert_equal(['123口456$ '], ScreenLines(1, 10))
|
call assert_equal(['123口456$ '], ScreenLines(1, 10))
|
||||||
let attr = screenattr(1, 9)
|
let attr = screenattr(1, 9)
|
||||||
|
|
||||||
normal! zl
|
normal! zl
|
||||||
call assert_equal(['!3口456$ '], ScreenLines(1, 10))
|
call assert_equal(['!3口456$ '], ScreenLines(1, 10))
|
||||||
call assert_equal(attr, screenattr(1, 1))
|
call assert_equal(attr, screenattr(1, 1))
|
||||||
@ -688,8 +689,7 @@ func Test_listchars_precedes_with_wide_char()
|
|||||||
call assert_equal(attr, screenattr(1, 1))
|
call assert_equal(attr, screenattr(1, 1))
|
||||||
call assert_equal(attr, screenattr(1, 2))
|
call assert_equal(attr, screenattr(1, 2))
|
||||||
normal! zl
|
normal! zl
|
||||||
" TODO: should it be '!' instead of '<' here?
|
call assert_equal(['!456$ '], ScreenLines(1, 10))
|
||||||
call assert_equal(['<456$ '], ScreenLines(1, 10))
|
|
||||||
call assert_equal(attr, screenattr(1, 1))
|
call assert_equal(attr, screenattr(1, 1))
|
||||||
normal! zl
|
normal! zl
|
||||||
call assert_equal(['!56$ '], ScreenLines(1, 10))
|
call assert_equal(['!56$ '], ScreenLines(1, 10))
|
||||||
@ -701,4 +701,25 @@ func Test_listchars_precedes_with_wide_char()
|
|||||||
bw!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_listchars_precedes_with_tab()
|
||||||
|
new
|
||||||
|
setlocal nowrap list listchars=eol:$,precedes:!,tab:<->
|
||||||
|
call setline(1, "1234\t56")
|
||||||
|
let expected_line = '1234<-->56$ '
|
||||||
|
call assert_equal([expected_line], ScreenLines(1, 12))
|
||||||
|
let expected_attrs = mapnew(range(1, 12), 'screenattr(1, v:val)')
|
||||||
|
let attr = expected_attrs[-2]
|
||||||
|
|
||||||
|
for i in range(8)
|
||||||
|
normal! zl
|
||||||
|
let expected_line = '!' .. expected_line[2:] .. ' '
|
||||||
|
let expected_attrs = [attr] + expected_attrs[2:] + expected_attrs[-1:]
|
||||||
|
call assert_equal([expected_line], ScreenLines(1, 12))
|
||||||
|
let attrs = mapnew(range(1, 12), 'screenattr(1, v:val)')
|
||||||
|
call assert_equal(expected_attrs, attrs)
|
||||||
|
endfor
|
||||||
|
|
||||||
|
bw!
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@ -704,6 +704,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 */
|
||||||
|
/**/
|
||||||
|
1130,
|
||||||
/**/
|
/**/
|
||||||
1129,
|
1129,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user