patch 7.4.1789
Problem: Cannot use ch_read() in the close callback.
Solution: Do not discard the channel if there is readahead. Do not discard
readahead if there is a close callback.
diff --git a/src/proto/channel.pro b/src/proto/channel.pro
index a263c1c..d14337d 100644
--- a/src/proto/channel.pro
+++ b/src/proto/channel.pro
@@ -48,7 +48,7 @@
void clear_job_options(jobopt_T *opt);
void free_job_options(jobopt_T *opt);
int get_job_options(typval_T *tv, jobopt_T *opt, int supported);
-channel_T *get_channel_arg(typval_T *tv, int check_open);
+channel_T *get_channel_arg(typval_T *tv, int check_open, int reading, int part);
void job_unref(job_T *job);
int free_unused_jobs_contents(int copyID, int mask);
void free_unused_jobs(int copyID, int mask);