Skip to content

Commit e8f23a5

Browse files
authored
Merge d069646 into 3777747
2 parents 3777747 + d069646 commit e8f23a5

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

neovim/api/nvim.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,17 +240,24 @@ def with_decode(self, decode=True):
240240
return Nvim(self._session, self.channel_id,
241241
self.metadata, self.types, decode, self._err_cb)
242242

243-
def ui_attach(self, width, height, rgb):
243+
def ui_attach(self, width, height, options=None):
244244
"""Register as a remote UI.
245245
246246
After this method is called, the client will receive redraw
247247
notifications.
248248
"""
249-
return self.request('ui_attach', width, height, rgb)
249+
if options is not None:
250+
if type(options) is bool:
251+
warnings.warn(
252+
'"rgb" attribute is deprecated. Use "options" instead.',
253+
DeprecationWarning,
254+
)
255+
options = {'rgb': options}
256+
return self.request('nvim_ui_attach', width, height, options)
250257

251258
def ui_detach(self):
252259
"""Unregister as a remote UI."""
253-
return self.request('ui_detach')
260+
return self.request('nvim_ui_detach')
254261

255262
def ui_try_resize(self, width, height):
256263
"""Notify nvim that the client window has resized.

0 commit comments

Comments
 (0)