1
0
forked from aniani/vim

patch 8.2.3545: setcellwidths() may make 'listchars' or 'fillchars' invalid

Problem:    setcellwidths() may make 'listchars' or 'fillchars' invalid.
Solution:   Check the value and give an error. (closes #9024)
This commit is contained in:
zeertzjq
2021-10-20 11:01:15 +01:00
committed by Bram Moolenaar
parent 051a40c8d9
commit 94358a1e6e
6 changed files with 56 additions and 3 deletions

View File

@@ -185,6 +185,16 @@ func Test_setcellwidths()
call assert_fails('call setcellwidths([[0x111, 0x122, 1], [0x122, 0x123, 2]])', 'E1113:')
call assert_fails('call setcellwidths([[0x33, 0x44, 2]])', 'E1114:')
set listchars=tab:--\\u2192
call assert_fails('call setcellwidths([[0x2192, 0x2192, 2]])', 'E834:')
set fillchars=stl:\\u2501
call assert_fails('call setcellwidths([[0x2501, 0x2501, 2]])', 'E835:')
set listchars&
set fillchars&
call setcellwidths([])
endfunc
func Test_print_overlong()