示例#1
0
 def deleteChar(self):
     if len(self.commandText) == 0:
         self.suggestText = ''
         return
     self.commandText = self.commandText[:-1]
     
     self._removeSuggestion()
     messages.removeFromMessage(1, 'command')
     self._addSuggestion()
示例#2
0
 def deleteChar(self):
     if self.leapCommand.status() == 0:
         self.playFailedLeapSound()
     else:
         messages.removeFromMessage(1, 'leap')
         try:
             self.leapCommand.delChar()
             if self.leapCommand.status() == 0:
                 # If the target becomes length 0 then return to the original view.
                 self.restoreViewSettings()
         except commands.AbortCommandException, e:
             self.info = e.getExplanation()
             self.restoreViewSettings()
             self.playFailedLeapSound()
示例#3
0
 def _removeSuggestion(self):
     if self.suggestText <> '':
         messages.removeFromMessage(len(self.suggestText), 'command')