diff 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
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2768,6 +2768,7 @@ setbufline({expr}, {lnum}, {text})
 					{expr}
 setbufvar({expr}, {varname}, {val})
 				none	set {varname} in buffer {expr} to {val}
+setcellwidths({list})		none	set character cell width overrides
 setcharsearch({dict})		Dict	set character search from {dict}
 setcmdpos({pos})		Number	set cursor position in command-line
 setenv({name}, {val})		none	set environment variable
@@ -8937,6 +8938,29 @@ setbufvar({expr}, {varname}, {val})			*s
 		third argument: >
 			GetValue()->setbufvar(buf, varname)
 
+
+setcellwidths({list})					*setcellwidths()*
+		Specify overrides for cell widths of character ranges.  This
+		tells Vim how wide characters are, counted in screen cells.
+		This overrides 'ambiwidth'.  Example: >
+		   setcellwidths([[0xad, 0xad, 1],
+		   		\ [0x2194, 0x2199, 2]]
+
+<					*E1109* *E1110* *E1111* *E1112* *E1113*
+		The {list} argument is a list of lists with each three
+		numbers. These three numbers are [low, high, width].  "low"
+		and "high" can be the same, in which case this refers to one
+		character. Otherwise it is the range of characters from "low"
+		to "high" (inclusive).  "width" is either 1 or 2, indicating
+		the character width in screen cells.
+		An error is given if the argument is invalid, also when a
+		range overlaps with another.
+		Only characters with value 0x100 and higher can be used.
+
+		To clear the overrides pass an empty list: >
+		   setcellwidths([]);
+
+
 setcharsearch({dict})					*setcharsearch()*
 		Set the current character search information to {dict},
 		which contains one or more of the following entries: