void DeleteLine::undo(EditorModel& model) { if (lines_ == 1 && model.line(1) == "") { model.line(1) = deletedLine_; } else { model.setRow(row_ - 1); model.insertLine(deletedLine_); } model.setRow(row_); model.setCol(col_); }
void HomeCtrl::undo(EditorModel& model) { model.setCol(col_); }