summaryrefslogtreecommitdiff
path: root/src/actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c
index 579d2ad..61c785c 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -86,6 +86,7 @@ static user_command user_commands[] =
{"unalias", cmd_unalias, arg_STRING},
{"prevscreen", cmd_prevscreen, arg_VOID},
{"nextscreen", cmd_nextscreen, arg_VOID},
+ {"warp", cmd_warp, arg_STRING},
/*@end (tag required for genrpbindings) */
/* Commands to set default behavior. */
@@ -2571,3 +2572,25 @@ cmd_prevscreen (int interactive, void *data)
return NULL;
}
+
+char *
+cmd_warp (int interactive, void *data)
+{
+ if (data == NULL && !interactive)
+ return xsprintf ("%s", defaults.warp ? "on":"off");
+
+ if (data == NULL)
+ {
+ message (" warp; one argument required ");
+ return NULL;
+ }
+
+ if (!strcasecmp (data, "on"))
+ defaults.warp = 1;
+ else if (!strcasecmp (data, "off"))
+ defaults.warp = 0;
+ else
+ message (" warp; Invalid argument ");
+
+ return NULL;
+}