From 09cbd0c695cdd953834a46d161f6d3b0bf385c1c Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 13 Aug 2009 23:44:18 +0000 Subject: Switch the prompt code to return an empty string when the user enters no response and reserve NULL for an explicit cancel. Change all callbacks to treat them the same so no functional change. Also add cancel key bindings to emacs mode which were missing. --- cmd-command-prompt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd-command-prompt.c') diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c index f729a66e..dac334b2 100644 --- a/cmd-command-prompt.c +++ b/cmd-command-prompt.c @@ -112,7 +112,7 @@ cmd_command_prompt_callback(void *data, const char *s) char *cause, *ptr, *buf, ch; size_t len, slen; - if (s == NULL) + if (s == NULL || *s == '\0') return (0); slen = strlen(s); -- cgit