feat(channel): add ChanClose event #40568

Problem:
Plugins using RPC sockets cannot detect when the peer closes a
`sockconnect()` channel, so reconnect logic has no reliable trigger.

Solution:
Add a `ChanClose` event with channel info before the channel is removed,
matching the existing `ChanOpen`/`ChanInfo` event model.
This commit is contained in:
Barrett Ruth
2026-07-04 14:21:25 -05:00
committed by GitHub
parent f0559997dd
commit d0a262db88
10 changed files with 63 additions and 5 deletions

View File

@@ -102,6 +102,7 @@ error('Cannot require a meta file')
--- |'BufWriteCmd'
--- |'BufWritePost'
--- |'BufWritePre'
--- |'ChanClose'
--- |'ChanInfo'
--- |'ChanOpen'
--- |'CmdUndefined'

View File

@@ -2191,6 +2191,7 @@ vim.go.ei = vim.go.eventignore
--- Note: The following events are considered to happen outside of a
--- window context and thus cannot be ignored by 'eventignorewin':
---
--- `ChanClose`,
--- `ChanInfo`,
--- `ChanOpen`,
--- `CmdUndefined`,