patch 9.1.0854: cannot get terminal cell size
Problem: cannot get terminal cell size
Solution: add getcellpixels() function to return xpixel * ypixel
cell size on terminal Unix (mikoto2000)
closes: #16004
Signed-off-by: mikoto2000 <mikoto2000@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 67f447d..1c7814f 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -1,4 +1,4 @@
-*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 10
+*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -222,6 +222,7 @@
getbufoneline({buf}, {lnum}) String line {lnum} of buffer {buf}
getbufvar({buf}, {varname} [, {def}])
any variable {varname} in buffer {buf}
+getcellpixels() List get character cell pixel size
getcellwidths() List get character cell width overrides
getchangelist([{buf}]) List list of change list items
getchar([{expr}]) Number or String
@@ -3786,6 +3787,15 @@
Return type: any, depending on {varname}
+getcellpixels() *getcellpixels()*
+ Returns a |List| of terminal cell pixel size.
+ List format is [xpixels, ypixels].
+ Only works on Unix. For gVim and on other systems,
+ returns [-1, -1].
+
+ Return type: list<Number>
+
+
getcellwidths() *getcellwidths()*
Returns a |List| of cell widths of character ranges overridden
by |setcellwidths()|. The format is equal to the argument of