diff options
author | ZyX <kp-pav@yandex.ru> | 2018-01-09 12:39:15 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2018-01-14 01:33:18 +0300 |
commit | a8cb510a2ed2f53f60ba4b2e722f4bc64954c606 (patch) | |
tree | b0ca2cde7aa21aa21321acddb69b5df775612db8 | |
parent | 6a1557f2f496bf8e8f4dad7ed0d423051a7b65e2 (diff) | |
download | rneovim-a8cb510a2ed2f53f60ba4b2e722f4bc64954c606.tar.gz rneovim-a8cb510a2ed2f53f60ba4b2e722f4bc64954c606.tar.bz2 rneovim-a8cb510a2ed2f53f60ba4b2e722f4bc64954c606.zip |
channel: Make empty output be represented by `['']` again
-rw-r--r-- | src/nvim/channel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/channel.c b/src/nvim/channel.c index 9d0a7d3c21..265d4d8b89 100644 --- a/src/nvim/channel.c +++ b/src/nvim/channel.c @@ -533,6 +533,9 @@ static inline list_T *buffer_to_tv_list(const char *const buf, const size_t len) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_ALWAYS_INLINE { list_T *const l = tv_list_alloc(kListLenMayKnow); + // Empty buffer should be represented by [''], encode_list_write() thinks + // empty list is fine for the case. + tv_list_append_string(l, "", 0); encode_list_write(l, buf, len); return l; } |