diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-04-21 10:50:31 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-04-21 10:50:31 -0300 |
commit | 5a0a868a61423fa395a89b49471d5451a5ed2c71 (patch) | |
tree | 71ca2476ba5a852de8945dfc0876682bf64936fe /page.c | |
parent | 9305bb601755e84ff91b79a490be00e0d654251b (diff) | |
download | jet-5a0a868a61423fa395a89b49471d5451a5ed2c71.tar.gz jet-5a0a868a61423fa395a89b49471d5451a5ed2c71.zip |
Fix point not updating after insert and delete
Diffstat (limited to 'page.c')
-rw-r--r-- | page.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); } } |