Merge pull request #1457 from diaevd/master
format_lines: fix line_len for config.max_width
This commit is contained in:
commit
29e1a3329f
1 changed files with 1 additions and 1 deletions
|
@ -496,7 +496,7 @@ fn format_lines(text: &mut StringBuffer, name: &str, config: &Config, report: &m
|
||||||
// Check for (and record) trailing whitespace.
|
// Check for (and record) trailing whitespace.
|
||||||
if let Some(lw) = last_wspace {
|
if let Some(lw) = last_wspace {
|
||||||
trims.push((cur_line, lw, b));
|
trims.push((cur_line, lw, b));
|
||||||
line_len -= b - lw;
|
line_len -= 1;
|
||||||
}
|
}
|
||||||
// Check for any line width errors we couldn't correct.
|
// Check for any line width errors we couldn't correct.
|
||||||
if config.error_on_line_overflow && line_len > config.max_width {
|
if config.error_on_line_overflow && line_len > config.max_width {
|
||||||
|
|
Loading…
Reference in a new issue