From f643e4c3b4897d9d1fc3488295e987deca534111 Mon Sep 17 00:00:00 2001 From: mike castleman Date: Thu, 18 Jul 2013 16:38:04 -0400 Subject: [PATCH] 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. --- pidcat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pidcat.py b/pidcat.py index ee060ff..d17d1a6 100755 --- a/pidcat.py +++ b/pidcat.py @@ -69,6 +69,7 @@ def colorize(message, fg=None, bg=None): def indent_wrap(message): if width == -1: return message + message = message.replace('\t', ' ') wrap_area = width - header_size messagebuf = '' current = 0