(self, terminal)
'contents-changed' callback
'contents-changed' callback
contents - changed callback
def save(self, terminal):
        """ 'contents-changed' callback """
        last_saved_col = self.loggers[terminal]["col"]
        last_saved_row = self.loggers[terminal]["row"]
        (col, row) = terminal.get_cursor_position()
        # Save only when buffer is nearly full,
        # for the sake of efficiency
        if row - last_saved_row < terminal.get_row_count():
            return
        self.write_content(terminal, last_saved_row, last_saved_col, row, col)
def save ( self , terminal ) : last_saved_col = self . loggers [ terminal ] [ "col" ] last_saved_row = self . loggers [ terminal ] [ "row" ] ( col , row ) = terminal . get_cursor_position ( ) # Save only when buffer is nearly full, # for the sake of efficiency if row - last_saved_row < terminal . get_row_count ( ) : return self . write_content ( terminal , last_saved_row , last_saved_col , row , col )