src/eric7/CodeFormatting/FormattingDiffWidget.py

branch
eric7
changeset 10922
36a90a94765c
parent 10683
779cda568acb
child 11006
a671918232f3
--- a/src/eric7/CodeFormatting/FormattingDiffWidget.py	Mon Sep 23 14:37:31 2024 +0200
+++ b/src/eric7/CodeFormatting/FormattingDiffWidget.py	Tue Sep 24 17:52:41 2024 +0200
@@ -43,8 +43,19 @@
         @param diff text containing the unified diff
         @type str
         """
+        self.__highlighter.regenerateRules(
+            {
+                "text": Preferences.getDiffColour("TextColor"),
+                "added": Preferences.getDiffColour("AddedColor"),
+                "removed": Preferences.getDiffColour("RemovedColor"),
+                "replaced": Preferences.getDiffColour("ReplacedColor"),
+                "context": Preferences.getDiffColour("ContextColor"),
+                "header": Preferences.getDiffColour("HeaderColor"),
+                "whitespace": Preferences.getDiffColour("BadWhitespaceColor"),
+            },
+            Preferences.getEditorOtherFonts("MonospacedFont"),
+        )
         self.diffEdit.clear()
-        self.__highlighter.regenerateRules()
 
         if diff:
             self.diffEdit.setPlainText(diff)

eric ide

mercurial