render all the non-floating windows, then render
in the `compindex` order, overwriting any floating window cells.
Finally, blend the floating window cells against the non-floating
background. To add more blending, you can group the windows by zindex,
and blend between the layers. But note that windows inside the same
zindex should still overwrite previous cells inside the same layer
without blending. This ensures that plugins that render multiple
windows, to add borders for example, work as expected.
["win_external_pos", grid, win] ~
Display or reconfigure external window `win`. The window should be
displayed as a separate top-level window in the desktop environment,
or something similar.
["win_hide", grid] ~
Stop displaying the window. The window can be shown again later.
["win_close", grid] ~
Close the window.
["msg_set_pos", grid, row, scrolled, sep_char, zindex, compindex] ~
Display messages on `grid`. The grid will be displayed at `row` on
the default grid (grid=1), covering the full column width. `scrolled`
indicates whether the message area has been scrolled to cover other
grids. It can be useful to draw a separator then |msgsep|. The Builtin
TUI draws a full line filled with `sep_char` ('fillchars' msgsep
field) and |hl-MsgSeparator| highlight.
When |ui-messages| is active, no message grid is used, and this event
will not be sent.
`zindex` and `compindex` have the same meaning as for `win_float_pos`.
The `zindex` always has a fixed value of 200 and included for
completeness.
["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. `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. When scrolling more than a full screen it is
an approximate value.
All updates, such as `grid_line`, in a batch affects the new viewport,
despite the fact that `win_viewport` is received after the updates.
Applications implementing, for example, smooth scrolling should take
this into account and keep the grid separated from what's displayed on
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.
==============================================================================
Popupmenu Events *ui-popupmenu*
Activated by the `ext_popupmenu` |ui-option|.
This UI extension delegates presentation of the |popupmenu-completion| and
command-line 'wildmenu'.
The UI decides how to present the menu. For example, depending on the last
`mode_change` event, command-line wildmenu may be presented horizontally,
while insert-mode completion would show a vertical popupmenu.
["popupmenu_show", items, selected, row, col, grid] ~
Show |popupmenu-completion|. `items` is an array of completion items
to show; each item is an array of the form [word, kind, menu, info] as
defined at |complete-items|, except that `word` is replaced by `abbr`
if present. `selected` is the initially-selected item, a zero-based
index into the array of items (-1 if no item is selected). `row` and
`col` give the anchor position, where the first character of the
completed word will be.