sixel: refactor handling of wrap-around delete- and split regions

Handle these on a higher abstraction level. The low level functions
that detect sixel intersections now assume the specified rectangle (or
line region) does *not* cross the wrap-around.

This is ensured by detecting a wrap-around region before hand, and
splitting it up into two, non wrapping regions.
This commit is contained in:
Daniel Eklöf 2020-06-27 13:56:13 +02:00
parent 3715a37be9
commit e896c2fa55
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 102 additions and 41 deletions

View file

@ -12,8 +12,9 @@ void sixel_unhook(struct terminal *term);
void sixel_destroy(struct sixel *sixel);
void sixel_delete_in_range(struct terminal *term, int start, int end);
void sixel_delete_at_row(struct terminal *term, int _row);
/* Row numbers are relative to current grid offset */
void sixel_delete_in_range(struct terminal *term, int row_start, int row_end);
void sixel_delete_at_row(struct terminal *term, int row);
void sixel_split_at_cursor(struct terminal *term);
void sixel_colors_report_current(struct terminal *term);