diff options
author | sabetts <sabetts> | 2001-08-24 17:45:19 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-08-24 17:45:19 +0000 |
commit | 87ea5e2a1081de517200e9029842cb6bc0090c47 (patch) | |
tree | 70cd465e2b65d79d93c7021eacf1edd5ef73963e /src/actions.c | |
parent | 64bf4e18b28591e8b6a6b133b440fa9f28d8e693 (diff) | |
download | ratpoison-87ea5e2a1081de517200e9029842cb6bc0090c47.zip |
added a user abort key
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c index b88ce85..3cb5e9a 100644 --- a/src/actions.c +++ b/src/actions.c @@ -549,6 +549,10 @@ cmd_select (int interactive, void *data) else str = strdup ((char *) data); + /* User aborted. */ + if (str == NULL) + return NULL; + /* Only search if the string contains something to search for. */ if (strlen (str) > 0) { @@ -597,6 +601,10 @@ cmd_rename (int interactive, void *data) else winname = strdup ((char *) data); + /* User aborted. */ + if (winname == NULL) + return NULL; + if (*winname) { free (current_window()->name); @@ -717,6 +725,10 @@ cmd_colon (int interactive, void *data) else input = get_more_input (MESSAGE_PROMPT_COMMAND, data); + /* User aborted. */ + if (input == NULL) + return NULL; + result = command (1, input); /* Gobble the result. */ @@ -738,6 +750,10 @@ cmd_exec (int interactive, void *data) else cmd = strdup ((char *) data); + /* User aborted. */ + if (cmd == NULL) + return NULL; + spawn (cmd); free (cmd); @@ -782,6 +798,10 @@ cmd_newwm(int interactive, void *data) else prog = strdup ((char *) data); + /* User aborted. */ + if (prog == NULL) + return NULL; + PRINT_DEBUG ("Switching to %s\n", prog); putenv(DisplayString(dpy)); |