From 5a0a868a61423fa395a89b49471d5451a5ed2c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Tue, 21 Apr 2020 10:50:31 -0300 Subject: Fix point not updating after insert and delete --- page.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'page.c') diff --git a/page.c b/page.c index e2a122d..09bf860 100644 --- a/page.c +++ b/page.c @@ -121,6 +121,7 @@ void insert_at_point(struct point *point, uint8_t c) { page->buffer[page->gap_start] = c; page->gap_start++; page->element_count++; + move_point_forward(point); } void delete_at_point(struct point *point) { @@ -142,6 +143,7 @@ void delete_at_point(struct point *point) { if (page->gap_start != 0) { page->gap_start--; page->element_count--; + move_point_backward(point); } } -- cgit v1.2.3