diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-08-19 15:51:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-08-19 15:51:59 +0200 |
commit | 683b7967253ecd44476a5a01d857271c0d3ff4f4 (patch) | |
tree | e73a18c1e3d5ccca473d163ba17942f00fb5600a /src | |
parent | d21f8b54b24e08d1f2b7c6ae32a9bc75ac4fa9fc (diff) | |
download | vim-git-683b7967253ecd44476a5a01d857271c0d3ff4f4.tar.gz |
patch 8.0.0964: channel write buffer does not work with poll()v8.0.0964
Problem: Channel write buffer does not work with poll().
Solution: Use the same mechanism as with select().
Diffstat (limited to 'src')
-rw-r--r-- | src/channel.c | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/channel.c b/src/channel.c index 9a14e1ed3..79cca795f 100644 --- a/src/channel.c +++ b/src/channel.c @@ -3018,7 +3018,9 @@ channel_fill_poll_write(int nfd_in, struct pollfd *fds) { chanpart_T *in_part = &ch->ch_part[PART_IN]; - if (in_part->ch_fd != INVALID_FD && in_part->ch_bufref.br_buf != NULL) + if (in_part->ch_fd != INVALID_FD + && (in_part->ch_bufref.br_buf != NULL + || in_part->ch_writeque.wq_next != NULL)) { in_part->ch_poll_idx = nfd; fds[nfd].fd = in_part->ch_fd; @@ -3946,13 +3948,7 @@ channel_poll_check(int ret_in, void *fds_in) idx = in_part->ch_poll_idx; if (ret > 0 && idx != -1 && (fds[idx].revents & POLLOUT)) { - if (in_part->ch_buf_append) - { - if (in_part->ch_bufref.br_buf != NULL) - channel_write_new_lines(in_part->ch_bufref.br_buf); - } - else - channel_write_in(channel); + channel_write_input(channel); --ret; } } diff --git a/src/version.c b/src/version.c index e6626cb16..291ccdff8 100644 --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 964, +/**/ 963, /**/ 962, |