From b86dcbe70b9c5acdeb4c11ffde101cabfd4522e1 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 23 Nov 2009 22:12:32 -0500 Subject: [PATCH] Status view: update the file variable when a line is selected ... so %(file) works as expected. --- NEWS | 8 ++++++++ tig.c | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 6467e13..7efc402 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,14 @@ Release notes ============= +master +------ + +Improvements: + + - Status view: update the file variable when a line is selected so %(file) works as + expected. + tig-0.15 -------- diff --git a/tig.c b/tig.c index 222b369..b20fb1b 100644 --- a/tig.c +++ b/tig.c @@ -5882,10 +5882,8 @@ status_request(struct view *view, enum request request, struct line *line) break; case REQ_VIEW_BLAME: - if (status) { - string_copy(opt_file, status->new.name); + if (status) opt_ref[0] = 0; - } return request; case REQ_ENTER: @@ -5952,6 +5950,8 @@ status_select(struct view *view, struct line *line) } string_format(view->ref, text, key, file); + if (status) + string_copy(opt_file, status->new.name); } static bool -- 2.30.2