QScintilla/Editor.py

branch
maintenance
changeset 6487
d3ca83d691e7
parent 6455
22a6fc33ab6d
parent 6481
9fd81275aaf2
child 6518
926d65bd23b8
equal deleted inserted replaced
6456:a930352300c9 6487:d3ca83d691e7
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