comparison runtime/doc/eval.txt @ 21971:0bc43a704f56 v8.2.1535

patch 8.2.1535: it is not possible to specify cell widths of characters Commit: https://github.com/vim/vim/commit/08aac3c6192f0103cb87e280270a32b50e653be1 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 28 21:04:24 2020 +0200 patch 8.2.1535: it is not possible to specify cell widths of characters Problem: It is not possible to specify cell widths of characters. Solution: Add setcellwidths().
author Bram Moolenaar <Bram@vim.org>
date Fri, 28 Aug 2020 21:15:03 +0200
parents 62f933f64447
children 85add08e6a2d
comparison
equal deleted inserted replaced
21970:7c76b6dbc14d 21971:0bc43a704f56
2766 setbufline({expr}, {lnum}, {text}) 2766 setbufline({expr}, {lnum}, {text})
2767 Number set line {lnum} to {text} in buffer 2767 Number set line {lnum} to {text} in buffer
2768 {expr} 2768 {expr}
2769 setbufvar({expr}, {varname}, {val}) 2769 setbufvar({expr}, {varname}, {val})
2770 none set {varname} in buffer {expr} to {val} 2770 none set {varname} in buffer {expr} to {val}
2771 setcellwidths({list}) none set character cell width overrides
2771 setcharsearch({dict}) Dict set character search from {dict} 2772 setcharsearch({dict}) Dict set character search from {dict}
2772 setcmdpos({pos}) Number set cursor position in command-line 2773 setcmdpos({pos}) Number set cursor position in command-line
2773 setenv({name}, {val}) none set environment variable 2774 setenv({name}, {val}) none set environment variable
2774 setfperm({fname}, {mode}) Number set {fname} file permissions to {mode} 2775 setfperm({fname}, {mode}) Number set {fname} file permissions to {mode}
2775 setline({lnum}, {line}) Number set line {lnum} to {line} 2776 setline({lnum}, {line}) Number set line {lnum} to {line}
8934 < This function is not available in the |sandbox|. 8935 < This function is not available in the |sandbox|.
8935 8936
8936 Can also be used as a |method|, the base is passed as the 8937 Can also be used as a |method|, the base is passed as the
8937 third argument: > 8938 third argument: >
8938 GetValue()->setbufvar(buf, varname) 8939 GetValue()->setbufvar(buf, varname)
8940
8941
8942 setcellwidths({list}) *setcellwidths()*
8943 Specify overrides for cell widths of character ranges. This
8944 tells Vim how wide characters are, counted in screen cells.
8945 This overrides 'ambiwidth'. Example: >
8946 setcellwidths([[0xad, 0xad, 1],
8947 \ [0x2194, 0x2199, 2]]
8948
8949 < *E1109* *E1110* *E1111* *E1112* *E1113*
8950 The {list} argument is a list of lists with each three
8951 numbers. These three numbers are [low, high, width]. "low"
8952 and "high" can be the same, in which case this refers to one
8953 character. Otherwise it is the range of characters from "low"
8954 to "high" (inclusive). "width" is either 1 or 2, indicating
8955 the character width in screen cells.
8956 An error is given if the argument is invalid, also when a
8957 range overlaps with another.
8958 Only characters with value 0x100 and higher can be used.
8959
8960 To clear the overrides pass an empty list: >
8961 setcellwidths([]);
8962
8939 8963
8940 setcharsearch({dict}) *setcharsearch()* 8964 setcharsearch({dict}) *setcharsearch()*
8941 Set the current character search information to {dict}, 8965 Set the current character search information to {dict},
8942 which contains one or more of the following entries: 8966 which contains one or more of the following entries:
8943 8967