Fixed stream reading for the Output to only include actually read chars.
Updated output callback processing not to run when nothing to process.
Updated un/comment to keep the current selection and caret position (#360).