QScintilla/Shell.py

changeset 3034
7ce719013078
parent 3030
4a0a82ddd9d2
child 3039
8dd0165d805d
equal deleted inserted replaced
3033:58fe260e7469 3034:7ce719013078
1324 Private method to insert a command selected from the history. 1324 Private method to insert a command selected from the history.
1325 1325
1326 @param cmd history entry to be inserted (string) 1326 @param cmd history entry to be inserted (string)
1327 """ 1327 """
1328 self.setCursorPosition(self.prline, self.prcol) 1328 self.setCursorPosition(self.prline, self.prcol)
1329 self.setSelection(self.prline, self.prcol,\ 1329 self.setSelection(self.prline, self.prcol,
1330 self.prline, self.lineLength(self.prline)) 1330 self.prline, self.lineLength(self.prline))
1331 self.removeSelectedText() 1331 self.removeSelectedText()
1332 self.__insertText(cmd) 1332 self.__insertText(cmd)
1333 1333
1334 def __searchHistory(self, txt, startIdx=-1): 1334 def __searchHistory(self, txt, startIdx=-1):
1614 1614
1615 The cursor is advanced to the end of the inserted text. 1615 The cursor is advanced to the end of the inserted text.
1616 1616
1617 @param txt text to be inserted (string) 1617 @param txt text to be inserted (string)
1618 """ 1618 """
1619 l = len(txt) 1619 length = len(txt)
1620 line, col = self.getCursorPosition() 1620 line, col = self.getCursorPosition()
1621 self.insertAt(txt, line, col) 1621 self.insertAt(txt, line, col)
1622 if re.search(self.linesepRegExp, txt) is not None: 1622 if re.search(self.linesepRegExp, txt) is not None:
1623 line += 1 1623 line += 1
1624 self.setCursorPosition(line, col + l) 1624 self.setCursorPosition(line, col + length)
1625 1625
1626 def __configure(self): 1626 def __configure(self):
1627 """ 1627 """
1628 Private method to open the configuration dialog. 1628 Private method to open the configuration dialog.
1629 """ 1629 """

eric ide

mercurial