mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 14:27:09 +00:00
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.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user