(self, from_row, to_row, attr)
Scroll up by one line, between from_row and to_row, filling empty row with attr.
Scroll up by one line, between from_row and to_row, filling empty row with attr.
Scroll up by one line between from_row and to_row filling empty row with attr .
def scroll_up(self, from_row, to_row, attr):
        """Scroll up by one line, between from_row and to_row, filling empty row with attr."""
        # submit dirty rects before scroll
        self.force_submit()
        _, back, _, _ = self._colourmap.split_attr(attr)
        if self._visible:
            self._queues.video.put(signals.Event(
                signals.VIDEO_SCROLL, (-1, from_row, to_row, back)
            ))
        # update text buffer
        new_row = _TextRow(attr, self._width)
        self._rows.insert(to_row, new_row)
        # remove any wrap above/into deleted row, unless the deleted row wrapped into the next
        if self._rows[from_row-2].wrap:
            self._rows[from_row-2].wrap = self._rows[from_row-1].wrap
        # delete row # from_row
        del self._rows[from_row-1]
        # update dbcs buffer
        self._dbcs_text[from_row-1:to_row-1] = self._dbcs_text[from_row:to_row]
        self._dbcs_text[to_row-1] = [u' '] * self._width
        # update pixel buffer
        sx0, sy0, sx1, sy1 = self.text_to_pixel_area(
            from_row+1, 1, to_row, self._width
        )
        tx0, ty0 = self.text_to_pixel_pos(from_row, 1)
        self._pixels.move(sy0, sy1+1, sx0, sx1+1, ty0, tx0)
def scroll_up ( self , from_row , to_row , attr ) : # submit dirty rects before scroll self . force_submit ( ) _ , back , _ , _ = self . _colourmap . split_attr ( attr ) if self . _visible : self . _queues . video . put ( signals . Event ( signals . VIDEO_SCROLL , ( - 1 , from_row , to_row , back ) ) ) # update text buffer new_row = _TextRow ( attr , self . _width ) self . _rows . insert ( to_row , new_row ) # remove any wrap above/into deleted row, unless the deleted row wrapped into the next if self . _rows [ from_row - 2 ] . wrap : self . _rows [ from_row - 2 ] . wrap = self . _rows [ from_row - 1 ] . wrap # delete row # from_row del self . _rows [ from_row - 1 ] # update dbcs buffer self . _dbcs_text [ from_row - 1 : to_row - 1 ] = self . _dbcs_text [ from_row : to_row ] self . _dbcs_text [ to_row - 1 ] = [ u' ' ] * self . _width # update pixel buffer sx0 , sy0 , sx1 , sy1 = self . text_to_pixel_area ( from_row + 1 , 1 , to_row , self . _width ) tx0 , ty0 = self . text_to_pixel_pos ( from_row , 1 ) self . _pixels . move ( sy0 , sy1 + 1 , sx0 , sx1 + 1 , ty0 , tx0 )