diff options
Diffstat (limited to 'src/gram.y')
-rwxr-xr-x | src/gram.y | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -419,14 +419,14 @@ command: extern graphADT graph; #ifdef UNDO create_undo_action(); - copy_to_undostruct($2.left.vp->row, $2.left.vp->col, $2.left.vp->row, $2.left.vp->col, 'd'); + copy_to_undostruct($2.left.vp->row, $2.left.vp->col, $2.left.vp->row, $2.left.vp->col, UNDO_DEL); // here we save in undostruct, all the ents that depends on the deleted one (before change) extern struct ent_ptr * deps; int i, n = 0; ents_that_depends_on_range($2.left.vp->row, $2.left.vp->col, $2.left.vp->row, $2.left.vp->col); if (deps != NULL) { for (i = 0, n = deps->vf; i < n; i++) - copy_to_undostruct(deps[i].vp->row, deps[i].vp->col, deps[i].vp->row, deps[i].vp->col, 'd'); + copy_to_undostruct(deps[i].vp->row, deps[i].vp->col, deps[i].vp->row, deps[i].vp->col, UNDO_DEL); } #endif if (getVertex(graph, lookat($2.left.vp->row, $2.left.vp->col), 0) != NULL) destroy_vertex(lookat($2.left.vp->row, $2.left.vp->col)); @@ -446,13 +446,13 @@ command: do_trigger($2.left.vp,TRG_WRITE); #ifdef UNDO - copy_to_undostruct($2.left.vp->row, $2.left.vp->col, $2.left.vp->row, $2.left.vp->col, 'a'); + copy_to_undostruct($2.left.vp->row, $2.left.vp->col, $2.left.vp->row, $2.left.vp->col, UNDO_ADD); // here we save in undostruct, all the ents that depends on the deleted one (after change) if (deps != NULL) free(deps); ents_that_depends_on_range($2.left.vp->row, $2.left.vp->col, $2.left.vp->row, $2.left.vp->col); if (deps != NULL) { for (i = 0, n = deps->vf; i < n; i++) - copy_to_undostruct(deps[i].vp->row, deps[i].vp->col, deps[i].vp->row, deps[i].vp->col, 'a'); + copy_to_undostruct(deps[i].vp->row, deps[i].vp->col, deps[i].vp->row, deps[i].vp->col, UNDO_ADD); free(deps); deps = NULL; } |