mirror of
https://github.com/neovim/neovim.git
synced 2026-07-14 05:10:36 +00:00
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:
@@ -397,6 +397,13 @@ BufWriteCmd Before writing the whole buffer to a file.
|
||||
BufWritePost After writing the whole buffer to a file
|
||||
(should undo the commands for BufWritePre).
|
||||
|
||||
*ChanClose*
|
||||
ChanClose After a channel was closed, before it is removed.
|
||||
This is triggered even when inside an
|
||||
autocommand defined without |autocmd-nested|.
|
||||
Sets these |v:event| keys:
|
||||
info as from |nvim_get_chan_info()|
|
||||
|
||||
*ChanInfo*
|
||||
ChanInfo State of channel changed, for instance the
|
||||
client of a RPC channel described itself.
|
||||
|
||||
@@ -219,6 +219,7 @@ EVENTS
|
||||
|
||||
• |:delmarks| now triggers the |MarkSet| autocommand with line==col==0, same
|
||||
as |nvim_buf_del_mark()|
|
||||
• |ChanClose| is triggered after a channel is closed, before it is removed.
|
||||
• |SessionWritePre| event emits just before |:mksession|.
|
||||
• |TextPutPre| and |TextPutPost| are triggered before/after putting text.
|
||||
• |TabMoved| is triggered when tabs are reordered.
|
||||
|
||||
@@ -2544,6 +2544,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Note: The following events are considered to happen outside of a
|
||||
window context and thus cannot be ignored by 'eventignorewin':
|
||||
|
||||
|ChanClose|,
|
||||
|ChanInfo|,
|
||||
|ChanOpen|,
|
||||
|CmdUndefined|,
|
||||
|
||||
Reference in New Issue
Block a user