From cb9e48c17bd6ab31a03b73951cb74383d7f9d572 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Fri, 8 Sep 2006 18:21:43 +0200 Subject: [PATCH] read_prompt: take prompt 'name' as arg --- tig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tig.c b/tig.c index f6532ad..b84c561 100644 --- a/tig.c +++ b/tig.c @@ -2687,7 +2687,7 @@ init_display(void) } static int -read_prompt(void) +read_prompt(const char *prompt) { enum { READING, STOP, CANCEL } status = READING; char buf[sizeof(opt_cmd) - STRING_SIZE("git \0")]; @@ -2700,7 +2700,7 @@ read_prompt(void) foreach_view (view, i) update_view(view); - report(":%.*s", pos, buf); + report("%s%.*s", prompt, pos, buf); /* Refresh, accept single keystroke of input */ key = wgetch(status_win); switch (key) { @@ -3010,7 +3010,7 @@ main(int argc, char *argv[]) * status_win restricted. */ switch (request) { case REQ_PROMPT: - if (read_prompt() == ERR) + if (read_prompt(":") == ERR) request = REQ_SCREEN_UPDATE; break; -- 2.30.2