--- a/src/eric7/JediInterface/RefactoringPreviewDialog.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/JediInterface/RefactoringPreviewDialog.py Wed Jul 13 14:55:47 2022 +0200 @@ -18,10 +18,11 @@ """ Class implementing a dialog to preview refactoring changes. """ + def __init__(self, title, diff, parent=None): """ Constructor - + @param title title string to be shown above the diff @type str @param diff changes to be shown (unified diff) @@ -31,11 +32,12 @@ """ super().__init__(parent) self.setupUi(self) - + self.buttonBox.addButton( - self.tr("&Apply Changes"), QDialogButtonBox.ButtonRole.AcceptRole) - + self.tr("&Apply Changes"), QDialogButtonBox.ButtonRole.AcceptRole + ) + self.highlighter = DiffHighlighter(self.previewEdit.document()) - + self.titleLabel.setText(title) self.previewEdit.setPlainText(diff)