Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: filter_output loses line prefixes
If the watched process ends a push to the pipe without a newline at the end, but with newlines in the middle, then sep_rx.split() will return with multiple entries, the last of which will not end with a newline and yet not be the empty string. This line prefix needs to be stashed into the pending buffer, too. This turns out to be exactly the same logic as if sep_rx.split had not split the string, so eliminate one layer of conditionals. This version incorporates feedback from Rob Browning to continue to pass a list to extend(). Signed-off-by: Nathaniel Filardo <[email protected]>
- Loading branch information