diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-04-22 20:23:46 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-04-22 20:23:46 -0300 |
commit | 4a29986fade6c81177dff812ddba69a598a010d8 (patch) | |
tree | 01203057a6e1d09bd32a82f88fef6914fe550225 /point.c | |
parent | ae003d1854021bdbc3128b2752198761d06772fd (diff) | |
download | jet-4a29986fade6c81177dff812ddba69a598a010d8.tar.gz jet-4a29986fade6c81177dff812ddba69a598a010d8.zip |
Separate gap edition from point edition
Diffstat (limited to 'point.c')
-rw-r--r-- | point.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -60,9 +60,7 @@ void insert_at_point(struct point *point, uint8_t c) { } } align_gap(point); - point->page->elements[point->page->gap_start] = c; - point->page->gap_start++; - point->page->element_count++; + insert_at_gap(point->page, c); move_point_forward(point); } @@ -79,9 +77,6 @@ void delete_at_point(struct point *point) { } } align_gap(point); - if (point->page->gap_start != 0) { - point->page->gap_start--; - point->page->element_count--; - move_point_backward(point); - } + delete_at_gap(point->page); + move_point_backward(point); } |