aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-03-28 15:27:32 +0100
committerbfredl <bjorn.linse@gmail.com>2024-03-29 08:15:28 +0100
commit2e4e12756a697d4767ec294e1f268384395e7a7f (patch)
tree5dc431001eefa5e4dc26651eea1e7c1dcd093f76 /src/nvim/api
parente2224a7933b6e30ab6efb0b7ad4e3f26da57c226 (diff)
downloadrneovim-2e4e12756a697d4767ec294e1f268384395e7a7f.tar.gz
rneovim-2e4e12756a697d4767ec294e1f268384395e7a7f.tar.bz2
rneovim-2e4e12756a697d4767ec294e1f268384395e7a7f.zip
feat(ui): indicate margins for the area used by win_viewport
Problem: using win_viewport for implementing smooth scrolling in an external UI might run into problems when winbar or borders is used, as there is no indication that the entire grid is not used for scrolled buffer text. Solution: add `win_viewport_margins` event.
Diffstat (limited to 'src/nvim/api')
-rw-r--r--src/nvim/api/ui_events.in.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/api/ui_events.in.h b/src/nvim/api/ui_events.in.h
index c2f02c34f8..2bd8792d71 100644
--- a/src/nvim/api/ui_events.in.h
+++ b/src/nvim/api/ui_events.in.h
@@ -118,6 +118,10 @@ void win_viewport(Integer grid, Window win, Integer topline, Integer botline, In
Integer curcol, Integer line_count, Integer scroll_delta)
FUNC_API_SINCE(7) FUNC_API_CLIENT_IGNORE;
+void win_viewport_margins(Integer grid, Window win, Integer top, Integer bottom, Integer left,
+ Integer right)
+ FUNC_API_SINCE(12) FUNC_API_CLIENT_IGNORE;
+
void win_extmark(Integer grid, Window win, Integer ns_id, Integer mark_id, Integer row, Integer col)
FUNC_API_SINCE(10) FUNC_API_REMOTE_ONLY;