From: Jonas Fonseca Date: Tue, 24 Nov 2009 03:12:32 +0000 (-0500) Subject: Status view: update the file variable when a line is selected X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b86dcbe70b9c5acdeb4c11ffde101cabfd4522e1;p=tig.git Status view: update the file variable when a line is selected ... so %(file) works as expected. --- 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