QsciScintillaCompat: changed the insert() workaround to be used for QScintilla 2.11.0 only.

Wed, 13 Feb 2019 18:51:15 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 13 Feb 2019 18:51:15 +0100
changeset 6734
1eaf6955acf5
parent 6733
519422827ace
child 6735
31e263d49c04

QsciScintillaCompat: changed the insert() workaround to be used for QScintilla 2.11.0 only.

QScintilla/QsciScintillaCompat.py file | annotate | diff | comparison | revisions
--- a/QScintilla/QsciScintillaCompat.py	Wed Feb 13 18:48:21 2019 +0100
+++ b/QScintilla/QsciScintillaCompat.py	Wed Feb 13 18:51:15 2019 +0100
@@ -1625,15 +1625,16 @@
     ## methods to implement workarounds for broken things
     ###########################################################################
     
-    def insert(self, txt):
-        """
-        Public method to insert text at the cursor position.
-        
-        @param txt text to be inserted
-        @type str
-        """
-        line, col = self.getCursorPosition()
-        self.insertAt(txt, line, col)
+    if QSCINTILLA_VERSION() == 0x020B00:
+        def insert(self, txt):
+            """
+            Public method to insert text at the cursor position.
+            
+            @param txt text to be inserted
+            @type str
+            """
+            line, col = self.getCursorPosition()
+            self.insertAt(txt, line, col)
     
     ###########################################################################
     ## methods below have been added to QScintilla starting with version 2.5

eric ide

mercurial