From b2d7778afb70e1d2493a66b71e4838ca91644743 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Tue, 17 Feb 2009 04:07:28 +0100 Subject: [PATCH] Define a tree_grep and fixing searching It was broken by the move to the annotated tree view. --- NEWS | 7 +++++++ tig.c | 16 +++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) 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, }; -- 2.30.2