~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to colordiff.py

  • Committer: Aaron Bentley
  • Date: 2007-03-12 13:49:32 UTC
  • Revision ID: abentley@panoramicfeedback.com-20070312134932-syieycgcl9pdvwl7
colordiff long-line detection skips hunk headers

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
        elif isinstance(item, InsertLine):
109
109
            if item.contents.endswith(' \n'):
110
110
                self.added_trailing_whitespace += 1
111
 
            if len(item.contents.rstrip('\n')) > self.max_line_len:
 
111
            if (len(item.contents.rstrip('\n')) > self.max_line_len and
 
112
                not item.contents.startswith('++ ')):
112
113
                self.long_lines += 1
113
114
            line_class = 'newtext'
114
115
            self._new_lines.append(item)