mirror of
https://github.com/vim/vim.git
synced 2025-10-22 08:34:29 -04:00
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:
committed by
Christian Brabandt
parent
6fbf63de86
commit
1083cae709
@@ -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 @@ getbufline({buf}, {lnum} [, {end}])
|
||||
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 @@ getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
|
||||
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
|
||||
|
@@ -7838,6 +7838,7 @@ getbufinfo() builtin.txt /*getbufinfo()*
|
||||
getbufline() builtin.txt /*getbufline()*
|
||||
getbufoneline() builtin.txt /*getbufoneline()*
|
||||
getbufvar() builtin.txt /*getbufvar()*
|
||||
getcellpixels() builtin.txt /*getcellpixels()*
|
||||
getcellwidths() builtin.txt /*getcellwidths()*
|
||||
getchangelist() builtin.txt /*getchangelist()*
|
||||
getchar() builtin.txt /*getchar()*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
*usr_41.txt* For Vim version 9.1. Last change: 2024 Nov 11
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -778,6 +778,7 @@ String manipulation: *string-functions*
|
||||
strdisplaywidth() size of string when displayed, deals with tabs
|
||||
setcellwidths() set character cell width overrides
|
||||
getcellwidths() get character cell width overrides
|
||||
getcellpixels() get character cell pixel size
|
||||
reverse() reverse the order of characters in a string
|
||||
substitute() substitute a pattern match with a string
|
||||
submatch() get a specific match in ":s" and substitute()
|
||||
@@ -1394,6 +1395,7 @@ Various: *various-functions*
|
||||
did_filetype() check if a FileType autocommand was used
|
||||
diff() diff two Lists of strings
|
||||
eventhandler() check if invoked by an event handler
|
||||
getcellpixels() get List of cell pixel size
|
||||
getpid() get process ID of Vim
|
||||
getscriptinfo() get list of sourced vim scripts
|
||||
getimstatus() check if IME status is active
|
||||
|
@@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.1. Last change: 2024 Nov 06
|
||||
*version9.txt* For Vim version 9.1. Last change: 2024 Nov 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -41621,6 +41621,7 @@ Functions: ~
|
||||
|foreach()| apply function to List items
|
||||
|getcmdcomplpat()| Shell command line completion
|
||||
|getcmdprompt()| get prompt for input()/confirm()
|
||||
|getcellpixels()| get List of terminal cell pixel size
|
||||
|getregion()| get a region of text from a buffer
|
||||
|getregionpos()| get a list of positions for a region
|
||||
|id()| get unique identifier for a Dict, List, Object,
|
||||
|
Reference in New Issue
Block a user