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:
Thiago de Arruda
2015-01-09 09:51:11 -03:00
parent abc147a977
commit d992213678
7 changed files with 15 additions and 21 deletions

View File

@@ -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);
}