{
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;
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;
}
}