summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d1191d3)
raw | patch | inline | side by side (parent: d1191d3)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 20 Apr 2008 21:34:07 +0000 (23:34 +0200) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 20 Apr 2008 21:34:07 +0000 (23:34 +0200) |
... and use ACS_VLINE instead of '|' for the revgraph.
tig.c | patch | blob | history |
index cdf3cd760112faaf0a803f5448657f5c7b3bf4ab..ef8f6caccb4faaaf6dd17430f2652b7e61cdc0f2 100644 (file)
--- a/tig.c
+++ b/tig.c
#define REVGRAPH_BRANCH '+'
#define REVGRAPH_COMMIT '*'
#define REVGRAPH_BOUND '^'
-#define REVGRAPH_LINE '|'
#define SIZEOF_REVGRAPH 19 /* Size of revision ancestry graphics. */
#define view_is_displayed(view) \
(view == display[0] || view == display[1])
+
+enum line_graphic {
+ LINE_GRAPHIC_VLINE,
+};
+
+static int line_graphics[] = {
+ /* LINE_GRAPHIC_VLINE: */ '|'
+};
+
static int
draw_text(struct view *view, const char *string, int max_len,
bool use_tilde, bool selected)
if (col < max) {
if (!selected)
wattrset(view->win, A_NORMAL);
- waddch(view->win, opt_line_graphics ? ACS_VLINE : '|');
+ waddch(view->win, line_graphics[LINE_GRAPHIC_VLINE]);
col++;
}
if (col < max) {
};
enum { DEFAULT, RSHARP, RDIAG, LDIAG };
static struct rev_filler fillers[] = {
- { ' ', REVGRAPH_LINE },
+ { ' ', '|' },
{ '`', '.' },
{ '\'', ' ' },
{ '/', ' ' },
struct rev_filler *filler;
size_t i;
+ if (opt_line_graphics)
+ fillers[DEFAULT].line = line_graphics[LINE_GRAPHIC_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;
+ }
}
static char *