--- a/RefactoringRope/ChangesPreviewDialog.py Wed Mar 08 19:35:56 2017 +0100 +++ b/RefactoringRope/ChangesPreviewDialog.py Tue Mar 28 19:36:35 2017 +0200 @@ -62,7 +62,7 @@ for line in current.data(ChangesPreviewDialog.ChangeRole)\ .splitlines(True): try: - format = self.formats[line[0]] + charFormat = self.formats[line[0]] except (IndexError, KeyError): - format = self.formats[' '] - self._appendText(line, format) + charFormat = self.formats[' '] + self._appendText(line, charFormat)