aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/ui.txt
diff options
context:
space:
mode:
authorMatthias Deiml <matthias@deiml.net>2023-03-12 23:58:46 +0100
committerGitHub <noreply@github.com>2023-03-12 15:58:46 -0700
commitfd2ece278b0941ec6673489e88868120e86b834a (patch)
treeaf318b0e355797ee3086037d52e2203492d13ddc /runtime/doc/ui.txt
parente5f4394eb7a27a9e5eaab088e6acf5553c64cf59 (diff)
downloadrneovim-fd2ece278b0941ec6673489e88868120e86b834a.tar.gz
rneovim-fd2ece278b0941ec6673489e88868120e86b834a.tar.bz2
rneovim-fd2ece278b0941ec6673489e88868120e86b834a.zip
feat(ui): add scroll_delta to win_viewport event #19270
scroll_delta contains how much the top line of a window moved since the last time win_viewport was emitted. It is expected to be used to implement smooth scrolling. For this purpose it only counts "virtual" or "displayed" so folds should count as one line. Because of this it adds extra information that cannot be computed from the topline parameter. Fixes #19227
Diffstat (limited to 'runtime/doc/ui.txt')
-rw-r--r--runtime/doc/ui.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt
index e706e36374..4ff74714f3 100644
--- a/runtime/doc/ui.txt
+++ b/runtime/doc/ui.txt
@@ -626,11 +626,15 @@ tabs.
When |ui-messages| is active, no message grid is used, and this event
will not be sent.
-["win_viewport", grid, win, topline, botline, curline, curcol] ~
+["win_viewport", grid, win, topline, botline, curline, curcol, line_count, scroll_delta] ~
Indicates the range of buffer text displayed in the window, as well
as the cursor position in the buffer. All positions are zero-based.
`botline` is set to one more than the line count of the buffer, if
- there are filler lines past the end.
+ there are filler lines past the end. `scroll_delta` contains how much
+ the top line of a window moved since `win_viewport` was last emitted.
+ It is intended to be used to implement smooth scrolling. For this
+ purpose it only counts "virtual" or "displayed" lines, so folds
+ only count as one line.
["win_extmark", grid, win, ns_id, mark_id, row, col] ~
Updates the position of an extmark which is currently visible in a