Sync OpenBSD patchset 1122:

Use a predefined structure for not-space cells used to set attributes.
This commit is contained in:
Tiago Cunha
2012-05-30 13:41:58 +00:00
parent 626c8aa8e7
commit c6fc8771a9
3 changed files with 6 additions and 7 deletions

View File

@@ -202,9 +202,8 @@ screen_redraw_screen(struct client *c, int status_only, int borders_only)
}
/* Set up pane border attributes. */
memcpy(&other_gc, &grid_default_cell, sizeof other_gc);
memcpy(&active_gc, &grid_default_cell, sizeof active_gc);
active_gc.data = other_gc.data = 'x'; /* not space */
memcpy(&other_gc, &grid_marker_cell, sizeof other_gc);
memcpy(&active_gc, &grid_marker_cell, sizeof active_gc);
active_gc.attr = other_gc.attr = GRID_ATTR_CHARSET;
fg = options_get_number(oo, "pane-border-fg");
colour_set_fg(&other_gc, fg);
@@ -317,8 +316,7 @@ screen_redraw_draw_number(struct client *c, struct window_pane *wp)
px -= len * 3;
py -= 2;
memcpy(&gc, &grid_default_cell, sizeof gc);
gc.data = '_'; /* not space */
memcpy(&gc, &grid_marker_cell, sizeof gc);
if (w->active == wp)
colour_set_bg(&gc, active_colour);
else
@@ -345,8 +343,7 @@ screen_redraw_draw_number(struct client *c, struct window_pane *wp)
tty_cursor(tty, xoff + wp->sx - len, yoff);
draw_text:
memcpy(&gc, &grid_default_cell, sizeof gc);
gc.data = '_'; /* not space */
memcpy(&gc, &grid_marker_cell, sizeof gc);
if (w->active == wp)
colour_set_fg(&gc, active_colour);
else