0
0
mirror of https://github.com/vim/vim.git synced 2025-11-15 23:14:06 -05:00

patch 8.0.0103

Problem:    May not process channel readahead. (skywind)
Solution:   If there is readahead don't block on input.
This commit is contained in:
Bram Moolenaar
2016-11-26 15:13:33 +01:00
parent 7554da4033
commit 8a8199e4a1
6 changed files with 40 additions and 5 deletions

View File

@@ -3899,6 +3899,31 @@ channel_parse_messages(void)
return ret;
}
/*
* Return TRUE if any channel has readahead. That means we should not block on
* waiting for input.
*/
int
channel_any_readahead(void)
{
channel_T *channel = first_channel;
ch_part_T part = PART_SOCK;
while (channel != NULL)
{
if (channel_has_readahead(channel, part))
return TRUE;
if (part < PART_ERR)
++part;
else
{
channel = channel->ch_next;
part = PART_SOCK;
}
}
return FALSE;
}
/*
* Mark references to lists used in channels.
*/