mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 22:36:09 +00:00
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
This commit is contained in:
@@ -1222,6 +1222,7 @@ struct window_S {
|
||||
colnr_T w_valid_leftcol; // last known w_leftcol
|
||||
|
||||
bool w_viewport_invalid;
|
||||
linenr_T w_viewport_last_topline; // topline when the viewport was last updated
|
||||
|
||||
// w_cline_height is the number of physical lines taken by the buffer line
|
||||
// that the cursor is on. We use this to avoid extra calls to plines_win().
|
||||
|
Reference in New Issue
Block a user