diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-08 12:08:28 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-08 20:03:40 +0800 |
commit | 9fedb6fd783b9ac48239bc7574779118eec3729a (patch) | |
tree | 7d8cb54de0dc1fc4ad9ddac1715cf3f34bdd329a /runtime | |
parent | 01a7009af9f7bbf5f1b38c82956caf67a7c8bcca (diff) | |
download | rneovim-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 'runtime')
-rw-r--r-- | runtime/doc/builtin.txt | 3 | ||||
-rw-r--r-- | runtime/doc/options.txt | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 447f1c89e2..b80bedfac5 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -6837,6 +6837,9 @@ setcellwidths({list}) *setcellwidths()* range overlaps with another. Only characters with value 0x100 and higher can be used. + If the new value causes 'fillchars' or 'listchars' to become + invalid it is rejected and an error is given. + To clear the overrides pass an empty list: > setcellwidths([]); diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 28922e9c7f..f0977c91de 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -591,6 +591,8 @@ A jump table for the options with a short description can be found at |Q_op|. "double": Use twice the width of ASCII characters. *E834* *E835* The value "double" cannot be used if 'listchars' or 'fillchars' + contains a character that would be double width. These errors may + also be given when calling setcellwidths(). The values are overruled for characters specified with |setcellwidths()|. |