mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Some minor performance improvements - most notably, don't search the
input state table if the next character matches the same state as before.
This commit is contained in:
22
grid.c
22
grid.c
@ -186,17 +186,19 @@ grid_clear_cell(struct grid *gd, u_int px, u_int py, u_int bg)
|
||||
struct grid_cell *gc;
|
||||
|
||||
memcpy(gce, &grid_cleared_entry, sizeof *gce);
|
||||
if (bg & COLOUR_FLAG_RGB) {
|
||||
grid_get_extended_cell(gl, gce, gce->flags);
|
||||
gl->flags |= GRID_LINE_EXTENDED;
|
||||
if (bg != 8) {
|
||||
if (bg & COLOUR_FLAG_RGB) {
|
||||
grid_get_extended_cell(gl, gce, gce->flags);
|
||||
gl->flags |= GRID_LINE_EXTENDED;
|
||||
|
||||
gc = &gl->extddata[gce->offset];
|
||||
memcpy(gc, &grid_cleared_cell, sizeof *gc);
|
||||
gc->bg = bg;
|
||||
} else {
|
||||
if (bg & COLOUR_FLAG_256)
|
||||
gce->flags |= GRID_FLAG_BG256;
|
||||
gce->data.bg = bg;
|
||||
gc = &gl->extddata[gce->offset];
|
||||
memcpy(gc, &grid_cleared_cell, sizeof *gc);
|
||||
gc->bg = bg;
|
||||
} else {
|
||||
if (bg & COLOUR_FLAG_256)
|
||||
gce->flags |= GRID_FLAG_BG256;
|
||||
gce->data.bg = bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user