aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/api_keysets_extra.lua
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2026-09-10 03:42:20 +0800
committerGitHub <noreply@github.com>2026-09-09 15:42:20 -0400
commit08dd3adffb60ae6c031f9b8310febd65bb14604e (patch)
tree4c692cc37fa752ec0c6c4735865286f43cf756d6 /runtime/lua/vim/_meta/api_keysets_extra.lua
parentac167f943a905669b29f337f18d22a1efefeca92 (diff)
downloadrneovim-08dd3adffb60ae6c031f9b8310febd65bb14604e.tar.gz
rneovim-08dd3adffb60ae6c031f9b8310febd65bb14604e.tar.bz2
rneovim-08dd3adffb60ae6c031f9b8310febd65bb14604e.zip
feat(api): add ev.win to autocmd callback args #39826
Problem: Autocmd callbacks currently have to rely on curwin, which may already have changed by the time they run. This is especially noticeable for WinNew, WinClosed, WinResized and WinScrolled. Solution: Track the window in the autocmd context and expose it as ev.win. Pass it explicitly for the window events that need it.
Diffstat (limited to 'runtime/lua/vim/_meta/api_keysets_extra.lua')
-rw-r--r--runtime/lua/vim/_meta/api_keysets_extra.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/_meta/api_keysets_extra.lua b/runtime/lua/vim/_meta/api_keysets_extra.lua
index acc23be54e..c1d574707d 100644
--- a/runtime/lua/vim/_meta/api_keysets_extra.lua
+++ b/runtime/lua/vim/_meta/api_keysets_extra.lua
@@ -76,6 +76,7 @@ error('Cannot require a meta file')
--- @field match string expanded value of <amatch>
--- @field buf integer expanded value of <abuf>
--- @field file string expanded value of <afile>
+--- @field win integer id of the window for the event, see |window-ID|
--- @field data? any arbitrary data passed from |nvim_exec_autocmds()|
--- @class vim.api.keyset.create_user_command.command_args