mirror of
https://github.com/tmux/tmux.git
synced 2025-09-04 06:56:58 +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-confirm-before.c,v 1.9 2009-07-28 22:12:16 tcunha Exp $ */
|
||||
/* $Id: cmd-confirm-before.c,v 1.10 2009-08-16 19:29:24 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
|
||||
@ -107,7 +107,9 @@ cmd_confirm_before_callback(void *data, const char *s)
|
||||
struct cmd_ctx ctx;
|
||||
char *cause;
|
||||
|
||||
if (s == NULL || tolower((u_char) s[0]) != 'y' || s[1] != '\0')
|
||||
if (s == NULL || *s == '\0')
|
||||
return (0);
|
||||
if (tolower((u_char) s[0]) != 'y' || s[1] != '\0')
|
||||
return (0);
|
||||
|
||||
if (cmd_string_parse(cdata->cmd, &cmdlist, &cause) != 0) {
|
||||
|
Reference in New Issue
Block a user