chiark
/
gitweb
/
~mdw
/
tig
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
17482b1
)
read_prompt: take prompt 'name' as arg
author
Jonas Fonseca
<fonseca@diku.dk>
Fri, 8 Sep 2006 16:21:43 +0000
(18:21 +0200)
committer
Jonas Fonseca
<fonseca@antimatter.localdomain>
Fri, 8 Sep 2006 16:30:09 +0000
(18:30 +0200)
tig.c
patch
|
blob
|
blame
|
history
diff --git
a/tig.c
b/tig.c
index f6532ad121f6d2d00dabdec663138caa485f3c9e..b84c561f95235a5a58e22df2bafea5253d49cd08 100644
(file)
--- a/
tig.c
+++ b/
tig.c
@@
-2687,7
+2687,7
@@
init_display(void)
}
static int
}
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")];
{
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);
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) {
/* 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:
* status_win restricted. */
switch (request) {
case REQ_PROMPT:
- if (read_prompt() == ERR)
+ if (read_prompt(
":"
) == ERR)
request = REQ_SCREEN_UPDATE;
break;
request = REQ_SCREEN_UPDATE;
break;