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

@@ -99,7 +99,6 @@ function Screen.new(width, height)
_mouse_enabled = true,
_bell = false,
_visual_bell = false,
_suspended = true,
_attrs = {},
_cursor = {
enabled = true, row = 1, col = 1
@@ -116,12 +115,10 @@ end
function Screen:attach()
request('ui_attach', self._width, self._height, true)
self._suspended = false
end
function Screen:detach()
request('ui_detach')
self._suspended = true
end
function Screen:expect(expected, attr_ids)
@@ -286,10 +283,6 @@ function Screen:_handle_update_bg(bg)
self._bg = bg
end
function Screen:_handle_suspend()
self._suspended = true
end
function Screen:_clear_block(top, lines, left, columns)
for i = top, top + lines - 1 do
self:_clear_row_section(i, left, left + columns - 1)