summaryrefslogtreecommitdiff
path: root/command.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-28 14:41:58 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-28 14:41:58 -0500
commitfb2a0b9998a599f9e8a9a1e911fd43345778f6ef (patch)
tree5c3ebf1b7afa1654ad1f9e9db7d765378044e3c8 /command.h
parent5662c988fa199d071fdfd9e9defd8e09a3486b0c (diff)
:split-swap
Diffstat (limited to 'command.h')
-rw-r--r--command.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/command.h b/command.h
index a8efe35..ad5034c 100644
--- a/command.h
+++ b/command.h
@@ -75,7 +75,8 @@ ENUM_U16 {
CMD_SPLIT_HORIZONTAL,
CMD_SPLIT_VERTICAL,
CMD_SPLIT_JOIN,
-
+ CMD_SPLIT_SWAP, // go to the other side of a split
+
CMD_ESCAPE, // by default this is the escape key. closes menus, etc.
CMD_COUNT
@@ -85,7 +86,7 @@ typedef struct {
char const *name;
Command cmd;
} CommandName;
-static CommandName const command_names[CMD_COUNT] = {
+static CommandName const command_names[] = {
{"unknown", CMD_UNKNOWN},
{"noop", CMD_NOOP},
{"left", CMD_LEFT},
@@ -147,6 +148,9 @@ static CommandName const command_names[CMD_COUNT] = {
{"split-horizontal", CMD_SPLIT_HORIZONTAL},
{"split-vertical", CMD_SPLIT_VERTICAL},
{"split-join", CMD_SPLIT_JOIN},
+ {"split-swap", CMD_SPLIT_SWAP},
{"escape", CMD_ESCAPE},
};
+static_assert_if_possible(arr_count(command_names) == CMD_COUNT)
+