comparison src/testdir/test_utf8.vim @ 26022:30e60bfd5fb3 v8.2.3545

patch 8.2.3545: setcellwidths() may make 'listchars' or 'fillchars' invalid Commit: https://github.com/vim/vim/commit/94358a1e6e640ca5ebeb295efdddd4e92b700673 Author: zeertzjq <zeertzjq@outlook.com> Date: Wed Oct 20 11:01:15 2021 +0100 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 https://github.com/vim/vim/issues/9024)
author Bram Moolenaar <Bram@vim.org>
date Wed, 20 Oct 2021 12:15:04 +0200
parents c3d1f65365c4
children 8d4b44cc324e
comparison
equal deleted inserted replaced
26021:ea28bf13ad1b 26022:30e60bfd5fb3
183 183
184 call assert_fails('call setcellwidths([[0x111, 0x122, 1], [0x115, 0x116, 2]])', 'E1113:') 184 call assert_fails('call setcellwidths([[0x111, 0x122, 1], [0x115, 0x116, 2]])', 'E1113:')
185 call assert_fails('call setcellwidths([[0x111, 0x122, 1], [0x122, 0x123, 2]])', 'E1113:') 185 call assert_fails('call setcellwidths([[0x111, 0x122, 1], [0x122, 0x123, 2]])', 'E1113:')
186 186
187 call assert_fails('call setcellwidths([[0x33, 0x44, 2]])', 'E1114:') 187 call assert_fails('call setcellwidths([[0x33, 0x44, 2]])', 'E1114:')
188
189 set listchars=tab:--\\u2192
190 call assert_fails('call setcellwidths([[0x2192, 0x2192, 2]])', 'E834:')
191
192 set fillchars=stl:\\u2501
193 call assert_fails('call setcellwidths([[0x2501, 0x2501, 2]])', 'E835:')
194
195 set listchars&
196 set fillchars&
197 call setcellwidths([])
188 endfunc 198 endfunc
189 199
190 func Test_print_overlong() 200 func Test_print_overlong()
191 " Text with more composing characters than MB_MAXBYTES. 201 " Text with more composing characters than MB_MAXBYTES.
192 new 202 new