Replace tabs with four spaces.

It appears that java stack dumps contain the tab character. This causes
line length computation to be messed up, so (on at least some
terminals), the lines end up wrapping twice -- once when we hit the
right edge of the terminal, and then again a few characters later when
indent_wrap() inserts a newline. By using spaces, where pidcat and the
terminal can agree on the width of the character, we obviate this
problem.
This commit is contained in:
mike castleman
2013-07-18 16:38:04 -04:00
parent eb0c5b2b58
commit f643e4c3b4
+1
View File
@@ -69,6 +69,7 @@ def colorize(message, fg=None, bg=None):
def indent_wrap(message): def indent_wrap(message):
if width == -1: if width == -1:
return message return message
message = message.replace('\t', ' ')
wrap_area = width - header_size wrap_area = width - header_size
messagebuf = '' messagebuf = ''
current = 0 current = 0