@@ -309,11 +309,13 @@ impl<'a> Printer for InteractivePrinter<'a> {
309309
310310 for &(style, region) in regions.iter() {
311311 let text = &*self.preprocess(region, &mut cursor_total);
312+ let text_trimmed = text.trim_end_matches(|c| c == '\r' || c == '\n');
312313 write!(
313314 handle,
314315 "{}",
315− as_terminal_escaped(style, &*text, true_color, colored_output, italics,)
316+ as_terminal_escaped(style, text_trimmed, true_color, colored_output, italics,)
316317 )?;
318+ write!(handle, "{}", &text[text_trimmed.len()..])?;
317319 }
318320
319321 if line.bytes().next_back() != Some(b'\n') {
@@ -342,7 +344,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
342344 // Regular text.
343345 (text, false) => {
344346 let text = self.preprocess(
345− text.trim_right_matches(|c| c == '\r' || c == '\n'),
347+ text.trim_end_matches(|c| c == '\r' || c == '\n'),
346348 &mut cursor_total,
347349 );
348350