diff options
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r-- | runtime/doc/api.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index d96169066c..d128bf0221 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -2961,6 +2961,38 @@ nvim_win_set_width({window}, {width}) *nvim_win_set_width()* • {window} Window handle, or 0 for current window • {width} Width as a count of columns +nvim_win_text_height({window}, {*opts}) *nvim_win_text_height()* + Computes the number of screen lines occupied by a range of text in a given + window. Works for off-screen text and takes folds into account. + + Diff filler or virtual lines above a line are counted as a part of that + line, unless the line is on "start_row" and "start_vcol" is specified. + + Diff filler or virtual lines below the last buffer line are counted in the + result when "end_row" is omitted. + + Line indexing is similar to |nvim_buf_get_text()|. + + Parameters: ~ + • {window} Window handle, or 0 for current window. + • {opts} Optional parameters: + • start_row: Starting line index, 0-based inclusive. When + omitted start at the very top. + • end_row: Ending line index, 0-based inclusive. When + omitted end at the very bottom. + • start_vcol: Starting virtual column index on "start_row", + 0-based inclusive, rounded down to full screen lines. When + omitted include the whole line. + • end_vcol: Ending virtual column index on "end_row", + 0-based exclusive, rounded up to full screen lines. When + omitted include the whole line. + + Return: ~ + The number of screen lines that the range of text occupy. + + See also: ~ + • |virtcol()| for text width. + ============================================================================== Win_Config Functions *api-win_config* |