@@ -1,13 +1,13 @@
11use app::Config;
2+use decorations::{Decoration, GridBorderDecoration, LineChangesDecoration, LineNumberDecoration};
23use diff::LineChanges;
34use errors::*;
5+use std::boxed::Box;
46use std::io::Write;
57use std::vec::Vec;
6−use std::boxed::Box;
8+use style::OutputWrap;
79use syntect::highlighting;
810use terminal::as_terminal_escaped;
9−use style::OutputWrap;
10−use decorations::{Decoration, GridBorderDecoration, LineChangesDecoration, LineNumberDecoration};
1111use Colors;
1212
1313pub struct Printer<'a> {
@@ -50,7 +50,9 @@ impl<'a> Printer<'a> {
5050
5151 // Disable the panel if the terminal is too small (i.e. can't fit 5 characters with the
5252 // panel showing).
53− if config.term_width < (decorations.len() + decorations.iter().fold(0, |a, x| a + x.width())) + 5 {
53+ if config.term_width
54+ < (decorations.len() + decorations.iter().fold(0, |a, x| a + x.width())) + 5
55+ {
5456 decorations.clear();
5557 panel_width = 0;
5658 }
@@ -117,7 +119,8 @@ impl<'a> Printer<'a> {
117119
118120 // Line decorations.
119121 if self.panel_width > 0 {
120− let decorations = self.decorations
122+ let decorations = self
123+ .decorations
121124 .iter()
122125 .map(|ref d| d.generate(line_number, false, self))
123126 .collect::<Vec<_>>();