diff options
-rw-r--r-- | CHANGES.txt | 2 | ||||
-rwxr-xr-x | pep8.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 8bd915c..5457e26 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,6 +19,8 @@ Bug fixes: * Fix E501 not detected in comments with Python 2.5. +* Fix caret position with ``--show-source`` when line contains tabs. + 1.5.1 (2014-03-27) ------------------ @@ -1600,7 +1600,7 @@ class StandardReport(BaseReport): else: line = self.lines[line_number - 1] print(line.rstrip()) - print(' ' * offset + '^') + print(re.sub(r'\S', ' ', line[:offset]) + '^') if self._show_pep8 and doc: print(' ' + doc.strip()) return self.file_errors |