QScintilla/EditorAssembly.py

changeset 1897
4c89af5a756f
parent 1807
9898a95461f1
child 2302
f29e9405c851
equal deleted inserted replaced
1894:a7096cf751db 1897:4c89af5a756f
95 lineno = self.__globalsCombo.itemData(index) 95 lineno = self.__globalsCombo.itemData(index)
96 if lineno is not None: 96 if lineno is not None:
97 if moveCursor: 97 if moveCursor:
98 txt = self.__editor.text(lineno - 1).rstrip() 98 txt = self.__editor.text(lineno - 1).rstrip()
99 pos = len(txt.replace(txt.strip(), "")) 99 pos = len(txt.replace(txt.strip(), ""))
100 self.__editor.gotoLine(lineno, pos if pos == 0 else pos + 1) 100 self.__editor.gotoLine(lineno, pos if pos == 0 else pos + 1, True)
101 self.__editor.setFocus() 101 self.__editor.setFocus()
102 102
103 # step 2: populate the members combo, if the entry is a class 103 # step 2: populate the members combo, if the entry is a class
104 self.__membersCombo.clear() 104 self.__membersCombo.clear()
105 entryName = self.__globalsCombo.itemText(index) 105 entryName = self.__globalsCombo.itemText(index)
174 """ 174 """
175 lineno = self.__membersCombo.itemData(index) 175 lineno = self.__membersCombo.itemData(index)
176 if lineno is not None and moveCursor: 176 if lineno is not None and moveCursor:
177 txt = self.__editor.text(lineno - 1).rstrip() 177 txt = self.__editor.text(lineno - 1).rstrip()
178 pos = len(txt.replace(txt.strip(), "")) 178 pos = len(txt.replace(txt.strip(), ""))
179 self.__editor.gotoLine(lineno, pos if pos == 0 else pos + 1) 179 self.__editor.gotoLine(lineno, pos if pos == 0 else pos + 1, True)
180 self.__editor.setFocus() 180 self.__editor.setFocus()
181 181
182 def __resetParseTimer(self): 182 def __resetParseTimer(self):
183 """ 183 """
184 Private slot to reset the parse timer. 184 Private slot to reset the parse timer.

eric ide

mercurial