summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2017-06-26 21:58:59 +0200
committerBoris Faure <billiob@gmail.com>2017-06-26 21:58:59 +0200
commit7ac685b68ca7da8388010372a41ec08bd92be618 (patch)
tree60b5f9a7a0f1530f4fe433844771e0193a978e2d
parent956f1eaa13a78617be6271b7b71b8f47f87c906c (diff)
termpty: DECERA only changes codepoints
-rw-r--r--src/bin/termpty.c13
-rw-r--r--src/bin/termpty.h2
-rw-r--r--src/bin/termptyesc.c2
3 files changed, 16 insertions, 1 deletions
diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 90a080f..2357576 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -1586,6 +1586,19 @@ termpty_cell_fill(Termpty *ty, Termcell *src, Termcell *dst, int n)
1586} 1586}
1587 1587
1588void 1588void
1589termpty_cells_set_content(Termpty *ty, Termcell *cells,
1590 Eina_Unicode codepoint, int count)
1591{
1592 int i;
1593 for (i = 0; i < count; i++)
1594 {
1595 _handle_block_codepoint_overwrite(ty, cells[i].codepoint, codepoint);
1596 cells[i].codepoint = codepoint;
1597 }
1598}
1599
1600
1601void
1589termpty_cell_codepoint_att_fill(Termpty *ty, Eina_Unicode codepoint, 1602termpty_cell_codepoint_att_fill(Termpty *ty, Eina_Unicode codepoint,
1590 Termatt att, Termcell *dst, int n) 1603 Termatt att, Termcell *dst, int n)
1591{ 1604{
diff --git a/src/bin/termpty.h b/src/bin/termpty.h
index aab9df5..c859401 100644
--- a/src/bin/termpty.h
+++ b/src/bin/termpty.h
@@ -255,6 +255,8 @@ Termblock *termpty_block_chid_get(Termpty *ty, const char *chid);
255void termpty_cell_copy(Termpty *ty, Termcell *src, Termcell *dst, int n); 255void termpty_cell_copy(Termpty *ty, Termcell *src, Termcell *dst, int n);
256void termpty_cell_fill(Termpty *ty, Termcell *src, Termcell *dst, int n); 256void termpty_cell_fill(Termpty *ty, Termcell *src, Termcell *dst, int n);
257void termpty_cell_codepoint_att_fill(Termpty *ty, Eina_Unicode codepoint, Termatt att, Termcell *dst, int n); 257void termpty_cell_codepoint_att_fill(Termpty *ty, Eina_Unicode codepoint, Termatt att, Termcell *dst, int n);
258void termpty_cells_set_content(Termpty *ty, Termcell *cells,
259 Eina_Unicode codepoint, int count);
258void termpty_screen_swap(Termpty *ty); 260void termpty_screen_swap(Termpty *ty);
259 261
260ssize_t termpty_line_length(const Termcell *cells, ssize_t nb_cells); 262ssize_t termpty_line_length(const Termcell *cells, ssize_t nb_cells);
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 26211f9..6794d2c 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -930,7 +930,7 @@ _handle_esc_csi_decera(Termpty *ty, Eina_Unicode **b)
930 for (; top <= bottom; top++) 930 for (; top <= bottom; top++)
931 { 931 {
932 Termcell *cells = &(TERMPTY_SCREEN(ty, left, top)); 932 Termcell *cells = &(TERMPTY_SCREEN(ty, left, top));
933 termpty_cells_clear(ty, cells, len); 933 termpty_cells_set_content(ty, cells, ' ', len);
934 } 934 }
935} 935}
936 936