diff options
author | andmarti1424 <andmarti@gmail.com> | 2017-04-03 19:07:39 -0300 |
---|---|---|
committer | andmarti1424 <andmarti@gmail.com> | 2017-04-03 19:07:39 -0300 |
commit | 5a82b9a30ddf99d9d63a2bf746b3fc7f2de2b4f9 (patch) | |
tree | cfb4cdea24cd5c234d1bfad60b094ed528619c49 | |
parent | 451d00fc159a9811f036994a39d2c8646d01e7ee (diff) |
undo of dc: updated colformat
-rw-r--r-- | src/cmds.c | 3 | ||||
-rw-r--r-- | src/undo.c | 4 | ||||
-rw-r--r-- | src/version.h | 2 |
3 files changed, 5 insertions, 4 deletions
@@ -136,7 +136,8 @@ void deletecol(int col, int mult) { ents_that_depends_on_range(0, col, maxrow, col); for (i = 0; deps != NULL && i < deps->vf; i++) copy_to_undostruct(deps[i].vp->row, deps[i].vp->col, deps[i].vp->row, deps[i].vp->col, 'd'); - add_undo_col_format(col-mult+1, 'R', fwidth[curcol], precision[curcol], realfmt[curcol]); + for (i=col; i < col + mult; i++) + add_undo_col_format(i, 'R', fwidth[i], precision[i], realfmt[i]); #endif fix_marks(0, -mult, 0, maxrow, col + mult -1, maxcol); @@ -543,7 +543,7 @@ void do_undo() { for (i=0; i < size; i++) { if (uf->cols[i].type == 'R') { - fwidth[uf->cols[i].col] = uf->cols[i].fwidth; + fwidth[uf->cols[i].col] = uf->cols[i].fwidth; precision[uf->cols[i].col] = uf->cols[i].precision; realfmt[uf->cols[i].col] = uf->cols[i].realfmt; } @@ -699,7 +699,7 @@ void do_redo() { for (i=0; i < size; i++) { if (uf->cols[i].type == 'A') { - fwidth[uf->cols[i].col] = uf->cols[i].fwidth; + fwidth[uf->cols[i].col] = uf->cols[i].fwidth; precision[uf->cols[i].col] = uf->cols[i].precision; realfmt[uf->cols[i].col] = uf->cols[i].realfmt; } diff --git a/src/version.h b/src/version.h index 4861853..b800104 100644 --- a/src/version.h +++ b/src/version.h @@ -2,4 +2,4 @@ * CODE REVISION NUMBER: */ -char * rev = "version 0.5.5-dev"; +char * rev = "version 0.5.6-dev"; |