add undo support for crop-to-visible - gramscii - A simple editor for ASCII box… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
commit 6d34f883ba3ce2474df90432cc4aa387e9093321 | |
parent d6b3606e315c4bf5692bc3b6daea3d3022ef14c5 | |
Author: KatolaZ <[email protected]> | |
Date: Thu, 1 Aug 2019 07:47:43 +0100 | |
add undo support for crop-to-visible | |
Diffstat: | |
M lineset.c | 1 - | |
M screen.c | 2 ++ | |
2 files changed, 2 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/lineset.c b/lineset.c | |
@@ -128,7 +128,6 @@ void paste_region(int x1, int y1){ | |
void copy_lines_to_ring(int y1, int y2, int which){ | |
int i, len, idx; | |
- int offset; | |
lineset_t *tmp; | |
if (y1 > y2){ | |
diff --git a/screen.c b/screen.c | |
@@ -462,7 +462,9 @@ void crop_to_nonblank(){ | |
#ifdef DEBUG | |
fprintf(stderr, "crop rectangle: (%d, %d)-(%d, %d)\n", x1, y1, x2, y2); | |
#endif | |
+ copy_lines_to_ring(0, y2, PRV_STATE); | |
crop_to_rect(x1, y1, x2, y2); | |
+ copy_lines_to_ring(0, y2, NEW_STATE); | |
modified=1; | |
redraw(); | |
} |