def cursor_up ( self , count = 1 ) : original_column = self . preferred_column or self . document . cursor_position_col self . cursor_position += self . document . get_cursor_up_position ( count = count , preferred_column = original_column ) # Remember the original column for the next up/down movement. self . preferred_column = original_column
how to force cursor to go to next line in python
( for multiline edit ) . Move cursor to the previous line .
def cursor_up(self, count=1):
        """ (for multiline edit). Move cursor to the previous line.  """
        original_column = self.preferred_column or self.document.cursor_position_col
        self.cursor_position += self.document.get_cursor_up_position(
            count=count, preferred_column=original_column)

        # Remember the original column for the next up/down movement.
        self.preferred_column = original_column