forked from aniani/vim
patch 8.2.3121: 'listchars' "exceeds" character appears in foldcolumn
Problem: 'listchars' "exceeds" character appears in foldcolumn. Window
separator is missing. (Leonid V. Fedorenchik)
Solution: Only draw the "exceeds" character in the text area. Break the
loop when not drawing the text. (closes #8524)
This commit is contained in:
@@ -2783,6 +2783,7 @@ win_line(
|
||||
// Show "extends" character from 'listchars' if beyond the line end and
|
||||
// 'list' is set.
|
||||
if (wp->w_lcs_chars.ext != NUL
|
||||
&& draw_state == WL_LINE
|
||||
&& wp->w_p_list
|
||||
&& !wp->w_p_wrap
|
||||
#ifdef FEAT_DIFF
|
||||
@@ -3050,7 +3051,8 @@ win_line(
|
||||
wp->w_p_rl ? (col < 0) :
|
||||
#endif
|
||||
(col >= wp->w_width))
|
||||
&& (*ptr != NUL
|
||||
&& (draw_state != WL_LINE
|
||||
|| *ptr != NUL
|
||||
#ifdef FEAT_DIFF
|
||||
|| filler_todo > 0
|
||||
#endif
|
||||
|
||||
10
src/testdir/dumps/Test_listchars_01.dump
Normal file
10
src/testdir/dumps/Test_listchars_01.dump
Normal file
@@ -0,0 +1,10 @@
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@2| @13||+1&&| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0|>+0#4040ff13&||+1#0000000&| +0#0000e05#a8a8a8255@2>a+0#0000000#ffffff0@2| @26
|
||||
| +0#0000e05#a8a8a8255@2| +0#0000000#ffffff0@16||+1&&| +0#0000e05#a8a8a8255@2| +0#0000000#ffffff0@1||+1&&| +0#0000e05#a8a8a8255@2| +0#0000000#ffffff0@29
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0| @15||+1&&| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0| ||+1&&| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0| @28
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@5| @10||+1&&| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0|>+0#4040ff13&||+1#0000000&| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@5| @23
|
||||
|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @3||+1#0000000&|~+0#4040ff13&| @31
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&| @3||+1#0000000&|~+0#4040ff13&| @31
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&| @3||+1#0000000&|~+0#4040ff13&| @31
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&| @3||+1#0000000&|~+0#4040ff13&| @31
|
||||
|<+1#0000000&|a|m|e|]| |[|+|]| |1|,|1| @3|A|l@1| |<|]| |1|,| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @3|1|,|1| @9|A|l@1
|
||||
| +0&&@59
|
||||
10
src/testdir/dumps/Test_listchars_02.dump
Normal file
10
src/testdir/dumps/Test_listchars_02.dump
Normal file
@@ -0,0 +1,10 @@
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@2| @13||+1&&| +0#0000e05#a8a8a8255@2|>+0#4040ff13#ffffff0||+1#0000000&| +0#0000e05#a8a8a8255@2>a+0#0000000#ffffff0@2| @27
|
||||
| +0#0000e05#a8a8a8255@2| +0#0000000#ffffff0@16||+1&&| +0#0000e05#a8a8a8255@2| +0#0000000#ffffff0||+1&&| +0#0000e05#a8a8a8255@2| +0#0000000#ffffff0@30
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0| @15||+1&&| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0||+1&&| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0| @29
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@5| @10||+1&&| +0#0000e05#a8a8a8255@2|>+0#4040ff13#ffffff0||+1#0000000&| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@5| @24
|
||||
|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @2||+1#0000000&|~+0#4040ff13&| @32
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&| @2||+1#0000000&|~+0#4040ff13&| @32
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&| @2||+1#0000000&|~+0#4040ff13&| @32
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&| @2||+1#0000000&|~+0#4040ff13&| @32
|
||||
|<+1#0000000&|a|m|e|]| |[|+|]| |1|,|1| @3|A|l@1| |<| |1|,| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @3|1|,|1| @10|A|l@1
|
||||
| +0&&@59
|
||||
10
src/testdir/dumps/Test_listchars_03.dump
Normal file
10
src/testdir/dumps/Test_listchars_03.dump
Normal file
@@ -0,0 +1,10 @@
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@2| @13||+1&&| +0#0000e05#a8a8a8255@2||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@2>a+0#0000000#ffffff0@2| @28
|
||||
| +0#0000e05#a8a8a8255@2| +0#0000000#ffffff0@16||+1&&| +0#0000e05#a8a8a8255@2||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@2| +0#0000000#ffffff0@31
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0| @15||+1&&| +0#0000e05#a8a8a8255@2||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0| @30
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@5| @10||+1&&| +0#0000e05#a8a8a8255@2||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@5| @25
|
||||
|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @1||+1#0000000&|~+0#4040ff13&| @33
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&| @1||+1#0000000&|~+0#4040ff13&| @33
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&| @1||+1#0000000&|~+0#4040ff13&| @33
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&| @1||+1#0000000&|~+0#4040ff13&| @33
|
||||
|<+1#0000000&|a|m|e|]| |[|+|]| |1|,|1| @3|A|l@1| |<| |1| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @4|1|,|1| @10|A|l@1
|
||||
| +0&&@59
|
||||
10
src/testdir/dumps/Test_listchars_04.dump
Normal file
10
src/testdir/dumps/Test_listchars_04.dump
Normal file
@@ -0,0 +1,10 @@
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@2| @13||+1&&| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@2>a+0#0000000#ffffff0@2| @29
|
||||
| +0#0000e05#a8a8a8255@2| +0#0000000#ffffff0@16||+1&&| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@2| +0#0000000#ffffff0@32
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0| @15||+1&&| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0| @31
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@5| @10||+1&&| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@5| @26
|
||||
|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| ||+1#0000000&|~+0#4040ff13&| @34
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&| ||+1#0000000&|~+0#4040ff13&| @34
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&| ||+1#0000000&|~+0#4040ff13&| @34
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&| ||+1#0000000&|~+0#4040ff13&| @34
|
||||
|<+1#0000000&|a|m|e|]| |[|+|]| |1|,|1| @3|A|l@1| |<|1| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @4|1|,|1| @11|A|l@1
|
||||
| +0&&@59
|
||||
10
src/testdir/dumps/Test_listchars_05.dump
Normal file
10
src/testdir/dumps/Test_listchars_05.dump
Normal file
@@ -0,0 +1,10 @@
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@2| @13||+1&&| +0#0000e05#a8a8a8255||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@2>a+0#0000000#ffffff0@2| @30
|
||||
| +0#0000e05#a8a8a8255@2| +0#0000000#ffffff0@16||+1&&| +0#0000e05#a8a8a8255||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@2| +0#0000000#ffffff0@33
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0| @15||+1&&| +0#0000e05#a8a8a8255||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0| @32
|
||||
| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@5| @10||+1&&| +0#0000e05#a8a8a8255||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@2|a+0#0000000#ffffff0@5| @27
|
||||
|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&||+1#0000000&|~+0#4040ff13&| @35
|
||||
|~| @18||+1#0000000&|~+0#4040ff13&||+1#0000000&|~+0#4040ff13&| @35
|
||||
|<+1#0000000&|a|m|e|]| |[|+|]| |1|,|1| @3|A|l@1| |<| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1
|
||||
| +0&&@59
|
||||
@@ -1,6 +1,8 @@
|
||||
" Tests for 'listchars' display with 'list' and :list
|
||||
|
||||
source check.vim
|
||||
source view_util.vim
|
||||
source screendump.vim
|
||||
|
||||
func Test_listchars()
|
||||
enew!
|
||||
@@ -356,4 +358,34 @@ func Test_listchars_window_local()
|
||||
set list& listchars&
|
||||
endfunc
|
||||
|
||||
func Test_listchars_foldcolumn()
|
||||
CheckScreendump
|
||||
|
||||
let lines =<< trim END
|
||||
call setline(1, ['aaa', '', 'a', 'aaaaaa'])
|
||||
vsplit
|
||||
vsplit
|
||||
windo set signcolumn=yes foldcolumn=1 winminwidth=0 nowrap list listchars=extends:>,precedes:<
|
||||
END
|
||||
call writefile(lines, 'XTest_listchars')
|
||||
|
||||
let buf = RunVimInTerminal('-S XTest_listchars', {'rows': 10, 'cols': 60})
|
||||
|
||||
call term_sendkeys(buf, "13\<C-W>>")
|
||||
call VerifyScreenDump(buf, 'Test_listchars_01', {})
|
||||
call term_sendkeys(buf, "\<C-W>>")
|
||||
call VerifyScreenDump(buf, 'Test_listchars_02', {})
|
||||
call term_sendkeys(buf, "\<C-W>>")
|
||||
call VerifyScreenDump(buf, 'Test_listchars_03', {})
|
||||
call term_sendkeys(buf, "\<C-W>>")
|
||||
call VerifyScreenDump(buf, 'Test_listchars_04', {})
|
||||
call term_sendkeys(buf, "\<C-W>>")
|
||||
call VerifyScreenDump(buf, 'Test_listchars_05', {})
|
||||
|
||||
" clean up
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('XTest_listchars')
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -755,6 +755,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
3121,
|
||||
/**/
|
||||
3120,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user