1
0
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:
Bram Moolenaar
2021-07-08 12:40:05 +02:00
parent db86472770
commit 41fb723ee9
8 changed files with 87 additions and 1 deletions

View File

@@ -2783,6 +2783,7 @@ win_line(
// Show "extends" character from 'listchars' if beyond the line end and // Show "extends" character from 'listchars' if beyond the line end and
// 'list' is set. // 'list' is set.
if (wp->w_lcs_chars.ext != NUL if (wp->w_lcs_chars.ext != NUL
&& draw_state == WL_LINE
&& wp->w_p_list && wp->w_p_list
&& !wp->w_p_wrap && !wp->w_p_wrap
#ifdef FEAT_DIFF #ifdef FEAT_DIFF
@@ -3050,7 +3051,8 @@ win_line(
wp->w_p_rl ? (col < 0) : wp->w_p_rl ? (col < 0) :
#endif #endif
(col >= wp->w_width)) (col >= wp->w_width))
&& (*ptr != NUL && (draw_state != WL_LINE
|| *ptr != NUL
#ifdef FEAT_DIFF #ifdef FEAT_DIFF
|| filler_todo > 0 || filler_todo > 0
#endif #endif

View 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

View 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

View 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

View 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

View 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

View File

@@ -1,6 +1,8 @@
" Tests for 'listchars' display with 'list' and :list " Tests for 'listchars' display with 'list' and :list
source check.vim
source view_util.vim source view_util.vim
source screendump.vim
func Test_listchars() func Test_listchars()
enew! enew!
@@ -356,4 +358,34 @@ func Test_listchars_window_local()
set list& listchars& set list& listchars&
endfunc 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 " vim: shiftwidth=2 sts=2 expandtab

View File

@@ -755,6 +755,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 */
/**/
3121,
/**/ /**/
3120, 3120,
/**/ /**/