QScintilla/Editor.py

changeset 6481
9fd81275aaf2
parent 6426
f072dd2edb0f
child 6487
d3ca83d691e7
child 6493
b64d6d0b4175
equal deleted inserted replaced
6480:4742bae89e6f 6481:9fd81275aaf2
4693 @keyparam context flag indicating to complete a context 4693 @keyparam context flag indicating to complete a context
4694 @type bool or None 4694 @type bool or None
4695 """ 4695 """
4696 line, col = self.getCursorPosition() 4696 line, col = self.getCursorPosition()
4697 text = self.text(line) 4697 text = self.text(line)
4698 if self.__isStartChar(text[col - 1]): 4698 try:
4699 self.__acText = self.getWordLeft(line, col - 1) + text[col - 1] 4699 if self.__isStartChar(text[col - 1]):
4700 else: 4700 self.__acText = self.getWordLeft(line, col - 1) + text[col - 1]
4701 self.__acText = self.getWordLeft(line, col) 4701 else:
4702 self.__acText = self.getWordLeft(line, col)
4703 except IndexError:
4704 self.__acText = ""
4705
4702 self.__acCompletions.clear() 4706 self.__acCompletions.clear()
4703 self.__acCompletionsFinished = 0 4707 self.__acCompletionsFinished = 0
4704 4708
4705 # Suppress empty completions 4709 # Suppress empty completions
4706 if auto and self.__acText == '': 4710 if auto and self.__acText == '':

eric ide

mercurial