def update_editing_line( self, line, line_num, edit_num, save_points ): after_save = ( edit_num >= save_points[self.side] ) line.maybe_set_side( self.side, self.new_strs[line_num - self.start_line], after_save ) # If this is an add, the other side is None. If not, it could # be affected by an earlier edit. if self.is_add: line.maybe_set_side( directions.opposite_lr( self.side ), None, False )
def copy_lines( self, side_to ): first, last = self.mycursor.get_ordered_begin_and_end() strs = self.get_lr_strs( directions.opposite_lr( side_to ), first, last ) self.diffmodel.edit_lines( first + self.top_line, last + self.top_line, side_to, strs ) self.draw_header_window() # TODO: only update changed lines self.set_top_line( self.top_line ) self.draw_screen()