aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-01-03 22:46:07 +0100
committerBoris Faure <billiob@gmail.com>2019-01-03 22:46:07 +0100
commita5d364bcbf0e411206c79b103e7acfe3056d7601 (patch)
treeb43257dc6862bf05c5118def676c397bbae290fd
parentconfig: s/;;/;/ (diff)
downloadterminology-a5d364bcbf0e411206c79b103e7acfe3056d7601.tar.gz
termptyops: ensure clearing cells do not increase link count
-rw-r--r--src/bin/termptyops.c13
-rw-r--r--src/bin/termptyops.h1
2 files changed, 4 insertions, 10 deletions
diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c
index 63968a9..f0dfd04 100644
--- a/src/bin/termptyops.c
+++ b/src/bin/termptyops.c
@@ -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);
}
diff --git a/src/bin/termptyops.h b/src/bin/termptyops.h
index dd5bd1d..bb0b11c 100644
--- a/src/bin/termptyops.h
+++ b/src/bin/termptyops.h
@@ -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);