fixed --max-line-length behaviour

This commit is contained in:
Boden Garman
2013-11-30 12:57:15 +11:00
parent 5000ad7f39
commit 68e98ae5e0
+3 -1
View File
@@ -140,7 +140,9 @@ pub fn wc(files: ~[~str], matches: &Matches) {
}
if (current_char_count > longest_line_length) {
longest_line_length = current_char_count;
// we subtract one here because `line.iter().len()` includes the LF
// matches GNU 'wc' behaviour
longest_line_length = current_char_count - 1;
}
},
_ => break