mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 10:26:31 +00:00
ui: Reimplement :suspend
command for remote UIs.
- Remove suspend method from the UI protocol - Handle `:suspend` by disconnecting the last channel that sent a request to nvim.
This commit is contained in:
@@ -485,6 +485,7 @@ static void on_request_event(Event event)
|
||||
{
|
||||
RequestEvent *e = event.data;
|
||||
Channel *channel = e->channel;
|
||||
last_message_source = channel->id;
|
||||
MsgpackRpcRequestHandler handler = e->handler;
|
||||
Array args = e->args;
|
||||
uint64_t request_id = e->request_id;
|
||||
|
@@ -97,7 +97,6 @@ static Object remote_ui_attach(uint64_t channel_id, uint64_t request_id,
|
||||
ui->update_fg = remote_ui_update_fg;
|
||||
ui->update_bg = remote_ui_update_bg;
|
||||
ui->flush = remote_ui_flush;
|
||||
ui->suspend = remote_ui_suspend;
|
||||
pmap_put(uint64_t)(connected_uis, channel_id, ui);
|
||||
ui_attach(ui);
|
||||
return NIL;
|
||||
@@ -319,9 +318,3 @@ static void remote_ui_flush(UI *ui)
|
||||
channel_send_event(data->channel_id, "redraw", data->buffer);
|
||||
data->buffer = (Array)ARRAY_DICT_INIT;
|
||||
}
|
||||
|
||||
static void remote_ui_suspend(UI *ui)
|
||||
{
|
||||
UIData *data = ui->data;
|
||||
remote_ui_disconnect(data->channel_id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user