From: Jonas Fonseca Date: Tue, 17 Feb 2009 03:07:28 +0000 (+0100) Subject: Define a tree_grep and fixing searching X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b2d7778afb70e1d2493a66b71e4838ca91644743;p=tig.git Define a tree_grep and fixing searching It was broken by the move to the annotated tree view. --- diff --git a/NEWS b/NEWS index 58aafed..eff874a 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,13 @@ Release notes ============= +tig master +--------- + +Bug fixes: + + - Tree view: fix searching. + tig-0.14.1 ---------- diff --git a/tig.c b/tig.c index ec31d49..74be272 100644 --- a/tig.c +++ b/tig.c @@ -4143,6 +4143,20 @@ tree_request(struct view *view, enum request request, struct line *line) return REQ_NONE; } +static bool +tree_grep(struct view *view, struct line *line) +{ + struct tree_entry *entry = line->data; + const char *text[] = { + entry->name, + opt_author ? entry->author : "", + opt_date ? mkdate(&entry->time) : "", + NULL + }; + + return grep_text(view, text); +} + static void tree_select(struct view *view, struct line *line) { @@ -4170,7 +4184,7 @@ static struct view_ops tree_ops = { tree_read, tree_draw, tree_request, - pager_grep, + tree_grep, tree_select, };