Commits

Steve Borho committed b5d6b46

status: truncate hunk display lines at 128 chars

Fixes #182

  • Participants
  • Parent commits ff74e12

Comments (0)

Files changed (1)

File hggtk/status.py

             lines = chunk.readlines()
             lines[-1] = lines[-1].strip('\n\r')
             for line in lines:
-                line = gobject.markup_escape_text(toutf(line))
+                line = gobject.markup_escape_text(toutf(line[:128]))
                 if line.startswith('---') or line.startswith('+++'):
                     hunk += '<span foreground="#000090">%s</span>' % line
                 elif line.startswith('-'):
             lines = fp.readlines()
             lines[-1] = lines[-1].strip('\n\r')
             for line in lines:
-                hunk += gobject.markup_escape_text(toutf(line))
+                hunk += gobject.markup_escape_text(toutf(line[:128]))
             return hunk
 
         def dohgdiff():