diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2016-04-13 16:37:09 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2016-10-22 10:51:32 +0200 |
commit | f6968dc0f7775591108aebbfe30e597dd0882c91 (patch) | |
tree | 048c0d9ee6b37ce26d9e270ef8efd187eea99976 /src/nvim/api/buffer.c | |
parent | 9d4fcec7c6b65ef04fd4416b014e96f33b1f708a (diff) | |
download | rneovim-f6968dc0f7775591108aebbfe30e597dd0882c91.tar.gz rneovim-f6968dc0f7775591108aebbfe30e597dd0882c91.tar.bz2 rneovim-f6968dc0f7775591108aebbfe30e597dd0882c91.zip |
api: call multiple methods atomically (useful in async contexts)
remove unused response_id parameter of handle_nvim_... helpers
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r-- | src/nvim/api/buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index c4415ddf94..09d717bff6 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -191,7 +191,7 @@ ArrayOf(String) nvim_buf_get_lines(uint64_t channel_id, Object str = STRING_OBJ(cstr_to_string(bufstr)); // Vim represents NULs as NLs, but this may confuse clients. - if (channel_id != INVALID_CHANNEL) { + if (channel_id != INTERNAL_CALL) { strchrsub(str.data.string.data, '\n', '\0'); } @@ -312,7 +312,7 @@ void nvim_buf_set_lines(uint64_t channel_id, // line and convert NULs to newlines to avoid truncation. lines[i] = xmallocz(l.size); for (size_t j = 0; j < l.size; j++) { - if (l.data[j] == '\n' && channel_id != INVALID_CHANNEL) { + if (l.data[j] == '\n' && channel_id != INTERNAL_CALL) { api_set_error(err, Exception, _("string cannot contain newlines")); new_len = i + 1; goto end; |