src/eric7/CodeFormatting/FormattingDiffWidget.py

branch
eric7
changeset 10922
36a90a94765c
parent 10683
779cda568acb
child 11006
a671918232f3
equal deleted inserted replaced
10921:495f084a737e 10922:36a90a94765c
41 Public method to show the given diff. 41 Public method to show the given diff.
42 42
43 @param diff text containing the unified diff 43 @param diff text containing the unified diff
44 @type str 44 @type str
45 """ 45 """
46 self.__highlighter.regenerateRules(
47 {
48 "text": Preferences.getDiffColour("TextColor"),
49 "added": Preferences.getDiffColour("AddedColor"),
50 "removed": Preferences.getDiffColour("RemovedColor"),
51 "replaced": Preferences.getDiffColour("ReplacedColor"),
52 "context": Preferences.getDiffColour("ContextColor"),
53 "header": Preferences.getDiffColour("HeaderColor"),
54 "whitespace": Preferences.getDiffColour("BadWhitespaceColor"),
55 },
56 Preferences.getEditorOtherFonts("MonospacedFont"),
57 )
46 self.diffEdit.clear() 58 self.diffEdit.clear()
47 self.__highlighter.regenerateRules()
48 59
49 if diff: 60 if diff:
50 self.diffEdit.setPlainText(diff) 61 self.diffEdit.setPlainText(diff)
51 else: 62 else:
52 self.diffEdit.setPlainText(self.tr("There is no difference.")) 63 self.diffEdit.setPlainText(self.tr("There is no difference."))

eric ide

mercurial