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-select-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-select-prompt.c')
-rw-r--r-- | cmd-select-prompt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-select-prompt.c b/cmd-select-prompt.c index 182fef92..6f868252 100644 --- a/cmd-select-prompt.c +++ b/cmd-select-prompt.c @@ -1,4 +1,4 @@ -/* $Id: cmd-select-prompt.c,v 1.11 2009-07-28 22:12:16 tcunha Exp $ */ +/* $Id: cmd-select-prompt.c,v 1.12 2009-08-16 19:29:24 tcunha Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -66,7 +66,7 @@ cmd_select_prompt_callback(void *data, const char *s) char msg[128]; u_int idx; - if (s == NULL) + if (s == NULL || *s == '\0') return (0); idx = strtonum(s, 0, UINT_MAX, &errstr); |