def onDelText(self, startDel, endDel): # update cursor import archy_globals cursor = self.getCursorPos() newCursor = archy_globals.updateTextPositionOnDelete( cursor, startDel, endDel) self.setCursor(newCursor)
def onDelText(self, startDel, endDel): import archy_globals CursorText.onDelText(self, startDel, endDel) # update selections changed = False for i in range(len(self.selections)): start, end = self.selections[i] newStart = archy_globals.updateTextPositionOnDelete(start, startDel, endDel) newEnd = archy_globals.updateTextPositionOnDelete(end, startDel, endDel) if newStart <> start or newEnd <> end: self.selections[i] = [newStart, newEnd] changed = True if changed: self._on_selections_changed()
def onDelText(self, startDel, endDel): import archy_globals CursorText.onDelText(self, startDel, endDel) # update selections changed = False for i in range(len(self.selections)): start, end = self.selections[i] newStart = archy_globals.updateTextPositionOnDelete( start, startDel, endDel) newEnd = archy_globals.updateTextPositionOnDelete( end, startDel, endDel) if newStart <> start or newEnd <> end: self.selections[i] = [newStart, newEnd] changed = True if changed: self._on_selections_changed()
def onDelText(self, startDel, endDel): # update cursor import archy_globals cursor = self.getCursorPos() newCursor = archy_globals.updateTextPositionOnDelete(cursor, startDel, endDel) self.setCursor(newCursor)