QScintilla/QsciScintillaCompat.py

changeset 2593
a2df0adce985
parent 2589
a51b0c113ed7
child 2632
94121e2f55b9
--- a/QScintilla/QsciScintillaCompat.py	Thu Apr 18 19:09:20 2013 +0200
+++ b/QScintilla/QsciScintillaCompat.py	Fri Apr 19 18:34:33 2013 +0200
@@ -474,6 +474,14 @@
         """
         self.SendScintilla(QsciScintilla.SCI_LINEENDEXTEND)
     
+    def hasSelection(self):
+        """
+        Public method to check for a selection.
+        
+        @return flag indicating the presence of a selection (boolean)
+        """
+        return self.getSelection()[0] != -1
+    
     def selectionIsRectangle(self):
         """
         Public method to check, if the current selection is rectangular.

eric ide

mercurial