patch 8.0.0105
Problem:    When using ch_read() with zero timeout, can't tell the difference
            between reading an empty line and nothing available.
Solution:   Add ch_canread().
diff --git a/src/channel.c b/src/channel.c
index 6c5a4ff..e5f2800 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -2603,7 +2603,7 @@
 /*
  * Return TRUE if "channel" has JSON or other typeahead.
  */
-    static int
+    int
 channel_has_readahead(channel_T *channel, ch_part_T part)
 {
     ch_mode_T	ch_mode = channel->ch_part[part].ch_mode;