Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
update incompatibility for python None. vim/vim#2246 autozimu/Languag…
Browse files Browse the repository at this point in the history
roxma committed Oct 26, 2017
1 parent 9b3b804 commit 8aae46b
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -58,6 +58,8 @@ Note that `neovim_rpc#jobstart` only support these options:
## Incompatibility issues

- Cannot pass `Funcref` object to python client. Pass function name instead.
- Python `None` will be converted to `''` instead of `v:null` into vimscript.
See [vim#2246](https://github.com/vim/vim/issues/2246)
- The following neovim-only API will be ignored quietly:
- `nvim_buf_add_highlight`
- `nvim_buf_clear_highlight`
2 changes: 2 additions & 0 deletions pythonx/neovim_rpc_protocol.py
Original file line number Diff line number Diff line change
@@ -34,6 +34,8 @@ def handler(obj):
return vim.buffers[msgpack.unpackb(obj.data)]
if obj.code == WINDOW_TYPE_ID:
return vim.windows[msgpack.unpackb(obj.data) - 1]
elif obj is None:
return ''
if sys.version_info.major!=2:
# python3 needs decode
obj = decode_if_bytes(obj)

0 comments on commit 8aae46b

Please sign in to comment.