diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-08-16 19:29:24 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-08-16 19:29:24 +0000 |
commit | 646d6a929c81adbb978f88e14ff9b27dee0463d0 (patch) | |
tree | f95f2413f150f1746fc095e2356f1f1651fb79b2 /cmd-command-prompt.c | |
parent | 6f9a2ee50a1100575eda807fae2689e42a531473 (diff) | |
download | rtmux-646d6a929c81adbb978f88e14ff9b27dee0463d0.tar.gz rtmux-646d6a929c81adbb978f88e14ff9b27dee0463d0.tar.bz2 rtmux-646d6a929c81adbb978f88e14ff9b27dee0463d0.zip |
Sync OpenBSD patchset 261:
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c index c7da9a2f..6d76b315 100644 --- a/cmd-command-prompt.c +++ b/cmd-command-prompt.c @@ -1,4 +1,4 @@ -/* $Id: cmd-command-prompt.c,v 1.21 2009-07-28 22:12:16 tcunha Exp $ */ +/* $Id: cmd-command-prompt.c,v 1.22 2009-08-16 19:29:24 tcunha Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); |