QScintilla/Editor.py

changeset 5900
cd90bfdc1247
parent 5897
ae17b1ae12bb
child 5905
f31960634997
--- a/QScintilla/Editor.py	Tue Oct 10 19:05:00 2017 +0200
+++ b/QScintilla/Editor.py	Sat Oct 14 20:07:08 2017 +0200
@@ -261,6 +261,7 @@
         self.cursorPositionChanged.connect(self.__cursorPositionChanged)
         self.modificationAttempted.connect(self.__modificationReadOnly)
         self.userListActivated.connect(self.__completionListSelected)
+        self.SCN_CHARADDED.connect(self.__charAddedPermanent)
         
         # margins layout
         if QSCINTILLA_VERSION() >= 0x020301:
@@ -4971,6 +4972,23 @@
                 bool(self.__ctHookFunctions))
     
     #################################################################
+    ## Methods needed by the code documentation viewer
+    #################################################################
+    
+    def __charAddedPermanent(self, charNumber):
+        """
+        Private slot called to handle the user entering a character.
+        
+        Note: This slot is always connected independent of the auto-completion
+        and calltips handling __charAdded() slot.
+        
+        @param charNumber value of the character entered (integer)
+        """
+        char = chr(charNumber)
+        if char == "(" and Preferences.getEditor("ShowInfoOnOpenBracket"):
+            self.vm.showEditorInfo(self)
+    
+    #################################################################
     ## Methods needed by the context menu
     #################################################################
     

eric ide

mercurial