diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-10-28 08:52:36 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-10-28 08:52:36 +0000 |
commit | 1eaefbf1698fc66815e538fc3040f4446f444f7b (patch) | |
tree | 1c5d4af0638a07200c38a893f4efba995ea1364a /screen-redraw.c | |
parent | 5730cbf3e3627d40177f9377b068f2ba50144ed9 (diff) | |
download | rtmux-1eaefbf1698fc66815e538fc3040f4446f444f7b.tar.gz rtmux-1eaefbf1698fc66815e538fc3040f4446f444f7b.tar.bz2 rtmux-1eaefbf1698fc66815e538fc3040f4446f444f7b.zip |
Add a minor optimisatin: if the character being printed is space, don't worry
about setting the background colour or attributes (except reverse).
Diffstat (limited to 'screen-redraw.c')
-rw-r--r-- | screen-redraw.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/screen-redraw.c b/screen-redraw.c index 0e612461..105cd4f4 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -257,6 +257,7 @@ screen_redraw_draw_number(struct client *c, struct window_pane *wp) if (wp->sx < len * 6 || wp->sy < 5) { tty_cursor(tty, xoff + px - len / 2, yoff + py); memcpy(&gc, &grid_default_cell, sizeof gc); + gc.data = '_'; /* not space */ colour_set_fg(&gc, colour); tty_attributes(tty, &gc); tty_puts(tty, buf); @@ -267,6 +268,7 @@ screen_redraw_draw_number(struct client *c, struct window_pane *wp) py -= 2; memcpy(&gc, &grid_default_cell, sizeof gc); + gc.data = '_'; /* not space */ colour_set_bg(&gc, colour); tty_attributes(tty, &gc); for (ptr = buf; *ptr != '\0'; ptr++) { |