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.
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.
Problem: When a job ends the close callback is invoked before other
callbacks. On Windows the close callback is not called.
Solution: First invoke out/err callbacks before the close callback.
Make the close callback work on Windows.
Problem: When a buffer gets updated while in command line mode, the screen
may be messed up.
Solution: Postpone the redraw when the screen is scrolled.