diff options
| author | Nick Cameron <nrc@ncameron.org> | 2017-05-01 15:13:19 +1200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-01 15:13:19 +1200 |
| commit | 29e1a3329fc1e52f9e596fce8a9ec196a9cb3293 (patch) | |
| tree | a14b8b96f1d0ad469e3d78b8fb4b356b94da4eb0 /src | |
| parent | 6a19c93f2a8c6af3a961f5de709995cac2968b2e (diff) | |
| parent | bb7b002b2372fbf43ab2f5a2f55784c8df1b767d (diff) | |
Merge pull request #1457 from diaevd/master
format_lines: fix line_len for config.max_width
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs index ddee0cdc286..8fddece4902 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -496,7 +496,7 @@ fn format_lines(text: &mut StringBuffer, name: &str, config: &Config, report: &m // Check for (and record) trailing whitespace. if let Some(lw) = last_wspace { trims.push((cur_line, lw, b)); - line_len -= b - lw; + line_len -= 1; } // Check for any line width errors we couldn't correct. if config.error_on_line_overflow && line_len > config.max_width { |
