summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4cf7c37)
raw | patch | inline | side by side (parent: 4cf7c37)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 16 Oct 2010 01:54:10 +0000 (21:54 -0400) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 16 Oct 2010 01:54:10 +0000 (21:54 -0400) |
... it's TRUE at all call sites.
tig.c | patch | blob | history |
index f336a699142353766ae2f4c083544d6dbddeac49..8933e3092a47bc62860430f2fa920dce978eb4a5 100644 (file)
--- a/tig.c
+++ b/tig.c
}
static bool
-draw_text(struct view *view, enum line_type type, const char *string, bool trim)
+draw_text(struct view *view, enum line_type type, const char *string)
{
char text[SIZEOF_STR];
do {
size_t pos = string_expand(text, sizeof(text), string, opt_tab_size);
- view->col += draw_chars(view, type, text, view->width + view->yoffset - view->col, trim);
+ view->col += draw_chars(view, type, text, view->width + view->yoffset - view->col, TRUE);
string += pos;
} while (*string && view->width + view->yoffset > view->col);
if (opt_line_number && draw_lineno(view, lineno))
return TRUE;
- draw_text(view, line->type, line->data, TRUE);
+ draw_text(view, line->type, line->data);
return TRUE;
}
struct tree_entry *entry = line->data;
if (line->type == LINE_TREE_HEAD) {
- if (draw_text(view, line->type, "Directory path /", TRUE))
+ if (draw_text(view, line->type, "Directory path /"))
return TRUE;
} else {
if (draw_mode(view, entry->mode))
if (opt_date && draw_date(view, &entry->time))
return TRUE;
}
- if (draw_text(view, line->type, entry->name, TRUE))
- return TRUE;
+
+ draw_text(view, line->type, entry->name);
return TRUE;
}
if (draw_lineno(view, lineno))
return TRUE;
- draw_text(view, LINE_DEFAULT, blame->text, TRUE);
+ draw_text(view, LINE_DEFAULT, blame->text);
return TRUE;
}
if (opt_author && draw_author(view, branch->author))
return TRUE;
- draw_text(view, type, branch->ref == &branch_all ? "All branches" : branch->ref->name, TRUE);
+ draw_text(view, type, branch->ref == &branch_all ? "All branches" : branch->ref->name);
return TRUE;
}
static char buf[] = { '?', ' ', ' ', ' ', 0 };
buf[0] = status->status;
- if (draw_text(view, line->type, buf, TRUE))
+ if (draw_text(view, line->type, buf))
return TRUE;
type = LINE_DEFAULT;
text = status->new.name;
}
- draw_text(view, type, text, TRUE);
+ draw_text(view, type, text);
return TRUE;
}
else
type = LINE_MAIN_REF;
- if (draw_text(view, type, "[", TRUE) ||
- draw_text(view, type, ref->name, TRUE) ||
- draw_text(view, type, "]", TRUE))
+ if (draw_text(view, type, "[") ||
+ draw_text(view, type, ref->name) ||
+ draw_text(view, type, "]"))
return TRUE;
- if (draw_text(view, LINE_DEFAULT, " ", TRUE))
+ if (draw_text(view, LINE_DEFAULT, " "))
return TRUE;
}
}
- draw_text(view, LINE_DEFAULT, commit->title, TRUE);
+ draw_text(view, LINE_DEFAULT, commit->title);
return TRUE;
}