summaryrefslogtreecommitdiffstats
path: root/cmd-command-prompt.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-13 23:44:18 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-13 23:44:18 +0000
commit09cbd0c695cdd953834a46d161f6d3b0bf385c1c (patch)
tree547649ceb2c777efe0cb20b2f2cae7ae0d7e1108 /cmd-command-prompt.c
parent7a359c00aca2e35dc26c2239f4261f0fa53f0caf (diff)
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.
Diffstat (limited to 'cmd-command-prompt.c')
-rw-r--r--cmd-command-prompt.c2
1 files changed, 1 insertions, 1 deletions
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);