termptyops: ensure clearing cells do not increase link count

terminology-1.4
Boris Faure 4 years ago
parent 99da684d81
commit a5d364bcbf
  1. 13
      src/bin/termptyops.c
  2. 1
      src/bin/termptyops.h

@ -22,21 +22,16 @@
#define DBG(...) EINA_LOG_DOM_DBG(_termpty_log_dom, __VA_ARGS__)
void
termpty_cells_fill(Termpty *ty, Eina_Unicode codepoint,
Termcell *cells, int count)
termpty_cells_clear(Termpty *ty, Termcell *cells, int count)
{
Termcell src;
memset(&src, 0, sizeof(src));
src.codepoint = codepoint;
src.codepoint = 0;
src.att = ty->termstate.att;
termpty_cell_fill(ty, &src, cells, count);
}
src.att.link_id = 0;
void
termpty_cells_clear(Termpty *ty, Termcell *cells, int count)
{
termpty_cells_fill(ty, 0, cells, count);
termpty_cell_fill(ty, &src, cells, count);
}

@ -10,7 +10,6 @@ typedef enum _Termpty_Clear
void termpty_text_save_top(Termpty *ty, Termcell *cells, ssize_t w_max);
void termpty_cells_copy(Termpty *ty, Termcell *cells, Termcell *dest, int count);
void termpty_cells_fill(Termpty *ty, Eina_Unicode codepoint, Termcell *cells, int count);
void termpty_cells_clear(Termpty *ty, Termcell *cells, int count);
void termpty_cells_att_fill_preserve_colors(Termpty *ty, Termcell *cells,
Eina_Unicode codepoint, int count);

Loading…
Cancel
Save