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>
This commit is contained in:
mikoto2000
2024-11-11 21:24:14 +01:00
committed by Christian Brabandt
parent 6fbf63de86
commit 1083cae709
10 changed files with 112 additions and 5 deletions

View File

@ -2077,6 +2077,14 @@ static funcentry_T global_functions[] =
ret_string, f_getbufoneline},
{"getbufvar", 2, 3, FEARG_1, arg3_buffer_string_any,
ret_any, f_getbufvar},
{"getcellpixels", 0, 0, 0, NULL,
ret_list_any,
#if (defined(UNIX) || defined(VMS)) && (defined(FEAT_EVAL) || defined(PROTO))
f_getcellpixels
#else
NULL
#endif
},
{"getcellwidths", 0, 0, 0, NULL,
ret_list_any, f_getcellwidths},
{"getchangelist", 0, 1, FEARG_1, arg1_buffer,