From: Jonas Fonseca Date: Fri, 8 Sep 2006 16:21:43 +0000 (+0200) Subject: read_prompt: take prompt 'name' as arg X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cb9e48c17bd6ab31a03b73951cb74383d7f9d572;p=tig.git read_prompt: take prompt 'name' as arg --- 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;