aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-08 12:08:28 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-08-08 20:03:40 +0800
commit9fedb6fd783b9ac48239bc7574779118eec3729a (patch)
tree7d8cb54de0dc1fc4ad9ddac1715cf3f34bdd329a /src/nvim/testdir
parent01a7009af9f7bbf5f1b38c82956caf67a7c8bcca (diff)
downloadrneovim-9fedb6fd783b9ac48239bc7574779118eec3729a.tar.gz
rneovim-9fedb6fd783b9ac48239bc7574779118eec3729a.tar.bz2
rneovim-9fedb6fd783b9ac48239bc7574779118eec3729a.zip
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 vim/vim#9024) https://github.com/vim/vim/commit/94358a1e6e640ca5ebeb295efdddd4e92b700673 Cherry-pick f_setcellwidths() change from patch 9.0.0036. Cherry-pick 'ambiwidth' docs update from runtime update 079ba76ae7a7.
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_utf8.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_utf8.vim b/src/nvim/testdir/test_utf8.vim
index 882e9623f6..ab3503c282 100644
--- a/src/nvim/testdir/test_utf8.vim
+++ b/src/nvim/testdir/test_utf8.vim
@@ -173,6 +173,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()