mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 18:06:30 +00:00
fix(rpc)!: preseve files when stdio channel is closed (#22137)
BREAKING CHANGE: Unsaved changes are now preserved rather than discarded when stdio channel is closed.
This commit is contained in:
@@ -550,6 +550,10 @@ void rpc_close(Channel *channel)
|
||||
|
||||
if (channel->streamtype == kChannelStreamStdio
|
||||
|| (channel->id == ui_client_channel_id && channel->streamtype != kChannelStreamProc)) {
|
||||
if (channel->streamtype == kChannelStreamStdio) {
|
||||
// Avoid hanging when there are no other UIs and a prompt is triggered on exit.
|
||||
remote_ui_disconnect(channel->id);
|
||||
}
|
||||
exit_from_channel(0);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user