From 2e4e12756a697d4767ec294e1f268384395e7a7f Mon Sep 17 00:00:00 2001 From: bfredl Date: Thu, 28 Mar 2024 15:27:32 +0100 Subject: 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. --- runtime/doc/ui.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index b8d47923ca..5f217c5537 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -656,6 +656,11 @@ tabs. the screen and copy it to the viewport destination once `win_viewport` is received. +["win_viewport_margins", grid, win, top, bottom, left, right] ~ + Indicates the margins of a window grid which are _not_ part of the + viewport as indicated by the `win_viewport` event. This happens + e.g. in the presence of 'winbar' and floating window borders. + ["win_extmark", grid, win, ns_id, mark_id, row, col] ~ Updates the position of an extmark which is currently visible in a window. Only emitted if the mark has the `ui_watched` attribute. -- cgit