aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-06-28 09:01:19 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-06-28 09:01:19 +0000
commit4006fc86e4af90bb302e0da98dbbcc8152950f12 (patch)
tree4963b14079485634267c0a2d9db338ce4bd1dbf1
parentrender: sixels: break out of loop when we're sure there aren't any more visible images (diff)
sixel: overwrite: pass 'width' to sixel_overwrite_at_cursor()
This is necessary to handle multi-column characters correctly.
-rw-r--r--sixel.c4
-rw-r--r--sixel.h2
-rw-r--r--terminal.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/sixel.c b/sixel.c
index beab0896..8ecc025a 100644
--- a/sixel.c
+++ b/sixel.c
@@ -440,10 +440,10 @@ sixel_overwrite_by_row(struct terminal *term, int row, int col, int width)
}
void
-sixel_overwrite_at_cursor(struct terminal *term)
+sixel_overwrite_at_cursor(struct terminal *term, int width)
{
sixel_overwrite_by_row(
- term, term->grid->cursor.point.row, term->grid->cursor.point.col, 1);
+ term, term->grid->cursor.point.row, term->grid->cursor.point.col, width);
}
void
diff --git a/sixel.h b/sixel.h
index bb3eb730..07e15196 100644
--- a/sixel.h
+++ b/sixel.h
@@ -32,7 +32,7 @@ void sixel_delete_at_row(struct terminal *term, int row);
void sixel_overwrite_by_rectangle(
struct terminal *term, int row, int col, int height, int width);
void sixel_overwrite_by_row(struct terminal *term, int row, int col, int width);
-void sixel_overwrite_at_cursor(struct terminal *term);
+void sixel_overwrite_at_cursor(struct terminal *term, int width);
void sixel_colors_report_current(struct terminal *term);
void sixel_colors_reset(struct terminal *term);
diff --git a/terminal.c b/terminal.c
index 504dec57..667d91d1 100644
--- a/terminal.c
+++ b/terminal.c
@@ -2384,7 +2384,7 @@ term_print(struct terminal *term, wchar_t wc, int width)
print_linewrap(term);
print_insert(term, width);
- sixel_overwrite_at_cursor(term);
+ sixel_overwrite_at_cursor(term, width);
/* *Must* get current cell *after* linewrap+insert */
struct row *row = term->grid->cur_row;