From efa092c4e4286943b2c4270624ee5c4331006312 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sun, 3 Sep 2006 22:00:55 +0200 Subject: [PATCH] prompt: make ':show ' use the diff view Being able to have the same diff open twice is not very useful. --- tig.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tig.c b/tig.c index 8124d3c..1ad1994 100644 --- a/tig.c +++ b/tig.c @@ -2704,7 +2704,10 @@ read_prompt(void) buf[pos++] = 0; if (!string_format(opt_cmd, "git %s", buf)) return ERR; - opt_request = REQ_VIEW_PAGER; + if (strncmp(buf, "show", 4) && isspace(buf[4])) + opt_request = REQ_VIEW_DIFF; + else + opt_request = REQ_VIEW_PAGER; return OK; } -- 2.30.2