summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-10-22 15:53:31 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2013-10-22 15:53:31 +0200
commit68e64ecf6d4a0b5d959962d875a97694b6abc23a (patch)
tree4fc7d42928a01cb833c692dec7ae6a126f8caec6
parent59a4f7a135fcfc608d998ea58c581060671c9e20 (diff)
screen: remove empty cell fallback
If we resize our screen, we guarantee that all cells are allocated. This hasn't been true in the early times so we needed an empty cell during rendering as fallback. It's no longer needed so remove it. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
-rw-r--r--src/tsm_screen.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/tsm_screen.c b/src/tsm_screen.c
index 2f1f9a4..26a8e4e 100644
--- a/src/tsm_screen.c
+++ b/src/tsm_screen.c
@@ -1775,15 +1775,12 @@ void tsm_screen_draw(struct tsm_screen *con, tsm_screen_draw_cb draw_cb,
int ret, warned = 0;
const uint32_t *ch;
size_t len;
- struct cell empty;
bool in_sel = false, sel_start = false, sel_end = false;
bool was_sel = false;
if (!con || !draw_cb)
return;
- cell_init(con, &empty);
-
cur_x = con->cursor_x;
if (con->cursor_x >= con->size_x)
cur_x = con->size_x - 1;
@@ -1837,10 +1834,7 @@ void tsm_screen_draw(struct tsm_screen *con, tsm_screen_draw_cb draw_cb,
}
for (j = 0; j < con->size_x; ++j) {
- if (j < line->size)
- cell = &line->cells[j];
- else
- cell = &empty;
+ cell = &line->cells[j];
memcpy(&attr, &cell->attr, sizeof(attr));
if (con->sel_active) {