Problem: When a channel callback consumes a lot of time Vim becomes
unresponsive. (skywind)
Solution: Bail out of checking channel readahead after 100 msec.
Problem: When the channel callback gets job info the job may already have
been deleted. (lifepillar)
Solution: Do not delete the job when the channel is still useful. (ichizok,
closes#1242, closes#1245)
Problem: An exiting job is detected with a large latency.
Solution: Check for pending job more often. (Ozaki Kiichi) Change the
double loop in mch_inchar() into one.
Problem: A channel is closed when reading on stderr or stdout fails, but
there may still be something to read on another part.
Solution: Turn ch_to_be_closed into a bitfield. (Ozaki Kiichi)
Problem: If a channel in NL mode is missing the NL at the end the remaining
characters are dropped.
Solution: When the channel is closed use the remaining text. (Ozaki Kiichi)
Problem: When using ":sleep" channel input is not handled.
Solution: When there is a channel check for input also when not in raw mode.
Check every 100 msec.
Problem: Can't tell which part of a channel has "buffered" status.
Solution: Add an optional argument to ch_status(). Let ch_info() also
return "buffered" for out_status and err_status.
Problem: The "Reading from channel output..." message can be unwanted.
Appending to a buffer leaves an empty first line behind.
Solution: Add the "out_msg" and "err_msg" options. Writing the first line
overwrites the first, empty line.
Problem: When starting a job that reads from a buffer and reaching the end,
the job hangs.
Solution: Close the pipe or socket when all lines were read.
Problem: Using function() with a name will find another function when it is
redefined.
Solution: Add funcref(). Refer to lambda using a partial. Fix several
reference counting issues.
Problem: Using submatch() in a lambda passed to substitute() is verbose.
Solution: Use a static list and pass it as an optional argument to the
function. Fix memory leak.
Problem: When writing buffer lines to a job there is no NL to NUL
conversion.
Solution: Make it work symmetrical with writing lines from a job into a
buffer.
Problem: When using a job in raw mode to append to a buffer garbage
characters are added.
Solution: Do not replace the trailing NUL with a NL. (Ozaki Kiichi)
Problem: Collapsing channel buffers and searching for NL does not work
properly. (Xavier de Gary, Ramel Eshed)
Solution: Do not assume the buffer contains a NUL or not. Change NUL bytes
to NL to avoid the string is truncated.
Problem: Whether a job has exited isn't detected until a character is
typed. After calling exit_cb the cursor is in the wrong place.
Solution: Don't wait forever for a character to be typed when there is a
pending job. Update the screen if neede after calling exit_cb.
Problem: When a channel writes to a buffer it doesn't find a buffer by the
short name but re-uses it anyway.
Solution: Find buffer also by the short name.
Problem: When a channel appends to a buffer that is 'nomodifiable' there is
an error but appending is done anyway.
Solution: Add the 'modifiable' option. Refuse to write to a 'nomodifiable'
when the value is 1.
Problem: Crash when job and channel are in the same dict while using
partials. (Luc Hermitte)
Solution: Do not decrement the channel reference count too early.
Problem: Callbacks are invoked when it's not safe. (Andrew Stewart)
Solution: When a channel is to be closed don't invoke callbacks right away,
wait for a safe moment.
Problem: When a job is no longer referenced and does not have an exit
callback the process may hang around in defunc state. (Nicola)
Solution: Call job_status() if the job is running and won't get freed
because it might still be useful.
Problem: A channel may be garbage collected while it's still being used by
a job. (James McCoy)
Solution: Mark the channel as used if the job is still used. Do the same
for channels that are still used.