summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b13787b)
raw | patch | inline | side by side (parent: b13787b)
author | Jonas Fonseca <fonseca@diku.dk> | |
Wed, 24 Mar 2010 12:47:42 +0000 (08:47 -0400) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Mon, 29 Mar 2010 00:18:16 +0000 (20:18 -0400) |
tig.c | patch | blob | history |
index d9d3c214340c78202267a999126cdb960381d428..1eb482aac4a8fbbcfbcd5e4b7ea80e884299a23a 100644 (file)
--- a/tig.c
+++ b/tig.c
(view == display[0] || view == display[1])
-enum line_graphic {
- LINE_GRAPHIC_VLINE
-};
-
-static chtype line_graphics[] = {
- /* LINE_GRAPHIC_VLINE: */ '|'
-};
-
static inline void
set_view_attr(struct view *view, enum line_type type)
{
int digits3 = view->digits < 3 ? 3 : view->digits;
int max = MIN(view->width + view->yoffset - view->col, digits3);
char *text = NULL;
+ chtype separator = opt_line_graphics ? ACS_VLINE : '|';
lineno += view->offset + 1;
if (lineno == 1 || (lineno % opt_num_interval) == 0) {
view->col += draw_chars(view, LINE_LINE_NUMBER, text, max, TRUE);
else
view->col += draw_space(view, LINE_LINE_NUMBER, max, digits3);
- return draw_graphic(view, LINE_DEFAULT, &line_graphics[LINE_GRAPHIC_VLINE], 1);
+ return draw_graphic(view, LINE_DEFAULT, &separator, 1);
}
static bool
struct rev_filler *filler;
size_t i;
- if (opt_line_graphics)
- fillers[DEFAULT].line = line_graphics[LINE_GRAPHIC_VLINE];
-
+ fillers[DEFAULT].line = opt_line_graphics ? ACS_VLINE : '|';
filler = &fillers[DEFAULT];
for (i = 0; i < graph->pos; i++) {
wbkgdset(status_win, get_line_attr(LINE_STATUS));
TABSIZE = opt_tab_size;
- if (opt_line_graphics) {
- line_graphics[LINE_GRAPHIC_VLINE] = ACS_VLINE;
- }
term = getenv("XTERM_VERSION") ? NULL : getenv("COLORTERM");
if (term && !strcmp(term, "gnome-terminal")) {