(self, new_row, new_column, new_attr=None, new_width=None)
Move the cursor and submit.
Move the cursor and submit.
Move the cursor and submit .
def move(self, new_row, new_column, new_attr=None, new_width=None):
        """Move the cursor and submit."""
        if new_attr:
            fore, _, _, _ = self._colourmap.split_attr(new_attr)
        else:
            fore = self._fore_attr
        if not new_width:
            new_width = self._width
        else:
            new_width = new_width * self._mode.font_width
        if (
                (new_row, new_column) == (self._row, self._col)
                and fore == self._fore_attr and new_width == self._width
            ):
            return
        # only submit move signal if visible (so that we see it in the right place)
        # or if the row changes (so that row-based cli interface can keep up with current row
        if self._visible or new_row != self._row:
            self._queues.video.put(signals.Event(
                signals.VIDEO_MOVE_CURSOR, (new_row, new_column, fore, new_width)
            ))
        self._row, self._col = new_row, new_column
        self._fore_attr = fore
        self._width = new_width
def move ( self , new_row , new_column , new_attr = None , new_width = None ) : if new_attr : fore , _ , _ , _ = self . _colourmap . split_attr ( new_attr ) else : fore = self . _fore_attr if not new_width : new_width = self . _width else : new_width = new_width * self . _mode . font_width if ( ( new_row , new_column ) == ( self . _row , self . _col ) and fore == self . _fore_attr and new_width == self . _width ) : return # only submit move signal if visible (so that we see it in the right place) # or if the row changes (so that row-based cli interface can keep up with current row if self . _visible or new_row != self . _row : self . _queues . video . put ( signals . Event ( signals . VIDEO_MOVE_CURSOR , ( new_row , new_column , fore , new_width ) ) ) self . _row , self . _col = new_row , new_column self . _fore_attr = fore self . _width = new_width