X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Ftextclient%2Fcommands.c;h=e6cbffc774add40160b9eccd602ace210eb69f98;hb=95b5731df2cba58a7f1e6f7827106ce08dd2de15;hp=98be7a698ac17e9e9a281c34bd9183cd15c0490d;hpb=b969641f53e87a0bd7ad7157e5a51f6ab38218c3;p=citadel.git diff --git a/citadel/textclient/commands.c b/citadel/textclient/commands.c index 98be7a698..e6cbffc77 100644 --- a/citadel/textclient/commands.c +++ b/citadel/textclient/commands.c @@ -575,8 +575,9 @@ void strprompt(char *prompt, char *str, int len) scr_printf(": "); color(BRIGHT_CYAN); ctdl_getline(buf, len); - if (buf[0] != 0) + if (buf[0] != 0) { strcpy(str, buf); + } color(DIM_WHITE); } @@ -636,6 +637,7 @@ int intprompt(char *prompt, int ival, int imin, int imax) */ void newprompt(char *prompt, char *str, int len) { + str[0] = 0; color(BRIGHT_MAGENTA); scr_printf("%s", prompt); color(DIM_MAGENTA); @@ -1054,6 +1056,7 @@ int getcmd(CtdlIPC *ipc, char *argbuf) if (cmdmatch(cmdbuf, cptr, 5)) { /* We've found our command. */ if (requires_string(cptr, cmdpos)) { + argbuf[0] = 0; ctdl_getline(argbuf, 64); } else { scr_printf("\n");