Esempio n. 1
0
 def onDelText(self, startDel, endDel):
     # update cursor
     import archy_globals
     cursor = self.getCursorPos()
     newCursor = archy_globals.updateTextPositionOnDelete(
         cursor, startDel, endDel)
     self.setCursor(newCursor)
Esempio n. 2
0
    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()
Esempio n. 3
0
    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()
Esempio n. 4
0
 def onDelText(self, startDel, endDel):
     # update cursor
     import archy_globals
     cursor = self.getCursorPos()
     newCursor = archy_globals.updateTextPositionOnDelete(cursor, startDel, endDel)
     self.setCursor(newCursor)