summaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/draw.c b/draw.c
index ec44c2f..bc6657d 100644
--- a/draw.c
+++ b/draw.c
@@ -173,7 +173,7 @@ void draw_arrow(int x, int y, char *a, int a_len, int fix){
char line;
void (*f)(int, int, char);
-
+ a_miny = a_maxy = y;
if (fix == FIX)
f = set_xy;
else
@@ -198,6 +198,8 @@ void draw_arrow(int x, int y, char *a, int a_len, int fix){
line = (a[i] & DIR_L) || (a[i] & DIR_R) ? line_h : line_v;
x += progr_x(a[i]);
y += progr_y(a[i]);
+ if (y < a_miny) a_miny = y;
+ if (y > a_maxy) a_maxy = y;
f(x, y, line);
}
/* f(x,y,mark_end);*/
@@ -250,8 +252,9 @@ update_arrow:
show_cursor();
}
if (c == 'a' || c == '\n'){
- invalidate_undo();
+ copy_lines_to_ring(a_miny, a_maxy, PRV_STATE);
draw_arrow(orig_x, orig_y, arrow, arrow_len, FIX);
+ copy_lines_to_ring(a_miny, a_maxy, NEW_STATE);
modified = 1;
}
redraw();