aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/api.txt
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2024-04-10 11:42:46 +0200
committerLuuk van Baal <luukvbaal@gmail.com>2024-05-02 15:57:06 +0200
commit037ea6e786b5d05f4a8965e4c2ba6aa60ec7c01a (patch)
treed59f33ff739409f1a280d2c3f9b8140a814c9e38 /runtime/doc/api.txt
parent7b14eb543d43344e2498335dc93a68d200469516 (diff)
downloadrneovim-037ea6e786b5d05f4a8965e4c2ba6aa60ec7c01a.tar.gz
rneovim-037ea6e786b5d05f4a8965e4c2ba6aa60ec7c01a.tar.bz2
rneovim-037ea6e786b5d05f4a8965e4c2ba6aa60ec7c01a.zip
feat(api): add nvim__redraw for more granular redrawing
Experimental and subject to future changes. Add a way to redraw certain elements that are not redrawn while Nvim is waiting for input, or currently have no API to do so. This API covers all that can be done with the :redraw* commands, in addition to the following new features: - Immediately move the cursor to a (non-current) window. - Target a specific window or buffer to mark for redraw. - Mark a buffer range for redraw (replaces nvim__buf_redraw_range()). - Redraw the 'statuscolumn'.
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r--runtime/doc/api.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index d15230ba2d..86f4c3875c 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -1566,6 +1566,35 @@ nvim__invalidate_glyph_cache() *nvim__invalidate_glyph_cache()*
For testing. The condition in schar_cache_clear_if_full is hard to reach,
so this function can be used to force a cache clear in a test.
+nvim__redraw({opts}) *nvim__redraw()*
+ EXPERIMENTAL: this API may change in the future.
+
+ Instruct Nvim to redraw various components.
+
+ Parameters: ~
+ • {opts} Optional parameters.
+ • win: Target a specific |window-ID| as described below.
+ • buf: Target a specific buffer number as described below.
+ • flush: Update the screen with pending updates.
+ • valid: When present mark `win`, `buf`, or all windows for
+ redraw. When `true`, only redraw changed lines (useful for
+ decoration providers). When `false`, forcefully redraw.
+ • range: Redraw a range in `buf`, the buffer in `win` or the
+ current buffer (useful for decoration providers). Expects a
+ tuple `[first, last]` with the first and last line number of
+ the range, 0-based end-exclusive |api-indexing|.
+ • cursor: Immediately update cursor position on the screen in
+ `win` or the current window.
+ • statuscolumn: Redraw the 'statuscolumn' in `buf`, `win` or
+ all windows.
+ • statusline: Redraw the 'statusline' in `buf`, `win` or all
+ windows.
+ • winbar: Redraw the 'winbar' in `buf`, `win` or all windows.
+ • tabline: Redraw the 'tabline'.
+
+ See also: ~
+ • |:redraw|
+
nvim__stats() *nvim__stats()*
Gets internal stats.