mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
channel: Make empty output be represented by ['']
again
This commit is contained in:
parent
6a1557f2f4
commit
a8cb510a2e
@ -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
|
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_ALWAYS_INLINE
|
||||||
{
|
{
|
||||||
list_T *const l = tv_list_alloc(kListLenMayKnow);
|
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);
|
encode_list_write(l, buf, len);
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user