Fixed the issue where a non matching background was shown in the editor for lines below the end of the text, if a lexer with a non-standard background was set. 5_2_x

Sat, 21 Jan 2012 14:49:00 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 21 Jan 2012 14:49:00 +0100
branch
5_2_x
changeset 1565
815eb7a39944
parent 1564
9f19fde2d6ca
child 1569
86af50c0061b

Fixed the issue where a non matching background was shown in the editor for lines below the end of the text, if a lexer with a non-standard background was set.

QScintilla/Editor.py file | annotate | diff | comparison | revisions
QScintilla/MiniEditor.py file | annotate | diff | comparison | revisions
QScintilla/Shell.py file | annotate | diff | comparison | revisions
QScintilla/Terminal.py file | annotate | diff | comparison | revisions
--- a/QScintilla/Editor.py	Fri Jan 20 18:54:06 2012 +0100
+++ b/QScintilla/Editor.py	Sat Jan 21 14:49:00 2012 +0100
@@ -1428,6 +1428,9 @@
         
         self.__setAnnotationStyles()
         
+        self.lexer_.setDefaultColor(self.lexer_.color(0))
+        self.lexer_.setDefaultPaper(self.lexer_.paper(0))
+        
     def __styleNeeded(self, position):
         """
         Private slot to handle the need for more styling.
@@ -3412,6 +3415,9 @@
         if self.lexer_ is not None:
             self.lexer_.readSettings(Preferences.Prefs.settings, "Scintilla")
             self.lexer_.initProperties()
+            
+            self.lexer_.setDefaultColor(self.lexer_.color(0))
+            self.lexer_.setDefaultPaper(self.lexer_.paper(0))
         
         # read the typing completer settings
         if self.completer is not None:
--- a/QScintilla/MiniEditor.py	Fri Jan 20 18:54:06 2012 +0100
+++ b/QScintilla/MiniEditor.py	Sat Jan 21 14:49:00 2012 +0100
@@ -2519,6 +2519,9 @@
         # now set the lexer properties
         self.lexer_.initProperties()
         
+        self.lexer_.setDefaultColor(self.lexer_.color(0))
+        self.lexer_.setDefaultPaper(self.lexer_.paper(0))
+        
     def __isPy2File(self):
         """
         Private method to return a flag indicating a Python 2 file.
--- a/QScintilla/Shell.py	Fri Jan 20 18:54:06 2012 +0100
+++ b/QScintilla/Shell.py	Sat Jan 21 14:49:00 2012 +0100
@@ -258,6 +258,9 @@
             if api is not None:
                 self.lexer_.setAPIs(api)
         
+        self.lexer_.setDefaultColor(self.lexer_.color(0))
+        self.lexer_.setDefaultPaper(self.lexer_.paper(0))
+        
     def __setMargin0(self):
         """
         Private method to configure margin 0.
--- a/QScintilla/Terminal.py	Fri Jan 20 18:54:06 2012 +0100
+++ b/QScintilla/Terminal.py	Sat Jan 21 14:49:00 2012 +0100
@@ -261,6 +261,9 @@
         self.setLexer(self.lexer_)
         self.lexer_.readSettings(Preferences.Prefs.settings, "Scintilla")
         
+        self.lexer_.setDefaultColor(self.lexer_.color(0))
+        self.lexer_.setDefaultPaper(self.lexer_.paper(0))
+        
     def __setMargin0(self):
         """
         Private method to configure margin 0.

eric ide

mercurial