Commits

Yuya Nishihara committed 6aab238

qscilib: extract function to remove Ctrl+L key binding

Comments (0)

Files changed (2)

tortoisehg/hgqt/cmdui.py

         self.setWrapMode(QsciScintilla.WrapCharacter)
         self._initfont()
         self._initmarkers()
-        self.standardCommands().boundTo(QKeySequence('CTRL+L')).setKey(0)
+        qscilib.unbindConflictedKeys(self)
 
     def _initfont(self):
         tf = qtlib.getfont('fontoutputlog')

tortoisehg/hgqt/qscilib.py

         self.setWrapVisualFlags(QsciScintilla.WrapFlagByBorder)
         self.textChanged.connect(self._resetfindcond)
         self._resetfindcond()
-        self.standardCommands().boundTo(QKeySequence('CTRL+L')).setKey(0)
+        unbindConflictedKeys(self)
 
     def read(self, f):
         result = super(Scintilla, self).read(f)
             return True
         return False
 
+def unbindConflictedKeys(sci):
+    sci.standardCommands().boundTo(QKeySequence('CTRL+L')).setKey(0)
+
 def qsciEolModeFromOs():
     if os.name.startswith('nt'):
         return QsciScintilla.EolWindows