summaryrefslogtreecommitdiffstats
path: root/screen-write.c
diff options
context:
space:
mode:
authornicm <nicm>2019-09-24 20:44:58 +0000
committernicm <nicm>2019-09-24 20:44:58 +0000
commite3359f8349cf972052604c089b5bab71f5e33095 (patch)
tree1604049179d85325334658c5447d0e1875a806ee /screen-write.c
parente8adcae0f24c6089cae9c60e7b087a00a582f9f9 (diff)
Some minor performance improvements - most notably, don't search the
input state table if the next character matches the same state as before.
Diffstat (limited to 'screen-write.c')
-rw-r--r--screen-write.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/screen-write.c b/screen-write.c
index 6c509e2c..34d16ee8 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -1326,8 +1326,7 @@ screen_write_collect_end(struct screen_write_ctx *ctx)
}
}
- memcpy(&gc, &ci->gc, sizeof gc);
- grid_view_set_cells(s->grid, s->cx, s->cy, &gc, ci->data, ci->used);
+ grid_view_set_cells(s->grid, s->cx, s->cy, &ci->gc, ci->data, ci->used);
screen_write_set_cursor(ctx, s->cx + ci->used, -1);
for (xx = s->cx; xx < screen_size_x(s); xx++) {
@@ -1351,8 +1350,7 @@ screen_write_collect_add(struct screen_write_ctx *ctx,
/*
* Don't need to check that the attributes and whatnot are still the
* same - input_parse will end the collection when anything that isn't
- * a plain character is encountered. Also nothing should make it here
- * that isn't a single ASCII character.
+ * a plain character is encountered.
*/
collect = 1;