aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/event/wstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/event/wstream.c')
-rw-r--r--src/nvim/event/wstream.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/event/wstream.c b/src/nvim/event/wstream.c
index f453e5898d..d2fb52243c 100644
--- a/src/nvim/event/wstream.c
+++ b/src/nvim/event/wstream.c
@@ -8,6 +8,7 @@
#include <uv.h>
+#include "nvim/log.h"
#include "nvim/event/loop.h"
#include "nvim/event/wstream.h"
#include "nvim/vim.h"
@@ -89,7 +90,7 @@ bool wstream_write(Stream *stream, WBuffer *buffer)
uv_buf_t uvbuf;
uvbuf.base = buffer->data;
- uvbuf.len = buffer->size;
+ uvbuf.len = UV_BUF_LEN(buffer->size);
if (uv_write(&data->uv_req, stream->uvstream, &uvbuf, 1, write_cb)) {
xfree(data);