eric6/QScintilla/QsciScintillaCompat.py

changeset 7949
17c0a4ec3cf0
parent 7923
91e843545d9a
child 7954
d32319ede131
--- a/eric6/QScintilla/QsciScintillaCompat.py	Sun Jan 03 18:02:19 2021 +0100
+++ b/eric6/QScintilla/QsciScintillaCompat.py	Sun Jan 03 22:24:05 2021 +0100
@@ -216,6 +216,21 @@
         """
         return self.styleAt(self.currentPosition())
     
+    def getSubStyleRange(self, styleNr):
+        """
+        Public method to get the sub style range for given style number.
+        
+        @param styleNr Number of the base style
+        @type int
+        @return start index of the sub style and their count
+        @rtype int, int
+        """
+        start = self.SendScintilla(QsciScintilla.SCI_GETSUBSTYLESSTART,
+            styleNr)
+        count = self.SendScintilla(QsciScintilla.SCI_GETSUBSTYLESLENGTH,
+            styleNr)
+        return start, count
+    
     def getEndStyled(self):
         """
         Public method to get the last styled position.

eric ide

mercurial