File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -352,6 +352,10 @@ channel_still_useful(channel_T *channel)
352352 if (channel -> ch_close_cb != NULL )
353353 return TRUE;
354354
355+ /* If reading from or a buffer it's still useful. */
356+ if (channel -> ch_part [PART_IN ].ch_buffer != NULL )
357+ return TRUE;
358+
355359 /* If there is no callback then nobody can get readahead. If the fd is
356360 * closed and there is no readahead then the callback won't be called. */
357361 has_sock_msg = channel -> ch_part [PART_SOCK ].ch_fd != INVALID_FD
@@ -365,8 +369,10 @@ channel_still_useful(channel_T *channel)
365369 || channel -> ch_part [PART_ERR ].ch_json_head .jq_next != NULL ;
366370 return (channel -> ch_callback != NULL && (has_sock_msg
367371 || has_out_msg || has_err_msg ))
368- || (channel -> ch_part [PART_OUT ].ch_callback != NULL && has_out_msg )
369- || (channel -> ch_part [PART_ERR ].ch_callback != NULL && has_err_msg );
372+ || ((channel -> ch_part [PART_OUT ].ch_callback != NULL
373+ || channel -> ch_part [PART_OUT ].ch_buffer ) && has_out_msg )
374+ || ((channel -> ch_part [PART_ERR ].ch_callback != NULL
375+ || channel -> ch_part [PART_ERR ].ch_buffer ) && has_err_msg );
370376}
371377
372378/*
Original file line number Diff line number Diff line change @@ -753,6 +753,8 @@ static char *(features[]) =
753753
754754static int included_patches [] =
755755{ /* Add new patch number below this line */
756+ /**/
757+ 1825 ,
756758/**/
757759 1824 ,
758760/**/
You can’t perform that action at this time.
0 commit comments