=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen-redraw.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- src/usr.bin/tmux/screen-redraw.c 2010/02/04 18:20:16 1.16 +++ src/usr.bin/tmux/screen-redraw.c 2010/09/11 16:19:22 1.17 @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-redraw.c,v 1.16 2010/02/04 18:20:16 nicm Exp $ */ +/* $OpenBSD: screen-redraw.c,v 1.17 2010/09/11 16:19:22 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -41,6 +41,8 @@ #define CELL_JOIN 11 #define CELL_OUTSIDE 12 +#define CELL_BORDERS " xqlkmjwvtun~" + /* Check if cell is on the border of a particular pane. */ int screen_redraw_cell_border1(struct window_pane *wp, u_int px, u_int py) @@ -173,8 +175,6 @@ struct grid_cell active_gc, other_gc; u_int i, j, type; int status, fg, bg; - const u_char *base, *ptr; - u_char ch, border[20]; /* Get status line, er, status. */ if (c->message_string != NULL || c->prompt_string != NULL) @@ -193,6 +193,7 @@ 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 */ + active_gc.attr = other_gc.attr = GRID_ATTR_CHARSET; fg = options_get_number(&c->session->options, "pane-border-fg"); colour_set_fg(&other_gc, fg); bg = options_get_number(&c->session->options, "pane-border-bg"); @@ -203,16 +204,6 @@ colour_set_bg(&active_gc, bg); /* Draw background and borders. */ - strlcpy(border, " |-....--||+.", sizeof border); - if (tty_term_has(tty->term, TTYC_ACSC)) { - base = " xqlkmjwvtun~"; - for (ptr = base; *ptr != '\0'; ptr++) { - if ((ch = tty_get_acs(tty, *ptr)) != '\0') - border[ptr - base] = ch; - } - other_gc.attr |= GRID_ATTR_CHARSET; - active_gc.attr |= GRID_ATTR_CHARSET; - } for (j = 0; j < tty->sy - status; j++) { if (status_only && j != tty->sy - 1) continue; @@ -225,7 +216,7 @@ else tty_attributes(tty, &other_gc); tty_cursor(tty, i, j); - tty_putc(tty, border[type]); + tty_putc(tty, CELL_BORDERS[type]); } }