summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-05 21:51:08 -0400
committerpommicket <pommicket@gmail.com>2023-08-05 21:51:08 -0400
commitbcb5589f17f755b965dec49af3232a5a69a8e68f (patch)
treecefcf8b3c42e56038e1902bfae53fff8508c7b98 /command.c
parent9e68c6f3dd0b90f908c31c02fedb4b51836d4c8e (diff)
some cleanup
Diffstat (limited to 'command.c')
-rw-r--r--command.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/command.c b/command.c
index 9abdcbf..65ca61f 100644
--- a/command.c
+++ b/command.c
@@ -591,13 +591,16 @@ void command_execute_ex(Ted *ted, Command c, const CommandArgument *full_argumen
}
} break;
case CMD_TAB_NEXT:
- if (node) node_tab_next(ted, node, argument);
+ if (node && argument > I32_MIN && argument < I32_MAX)
+ node_tab_next(ted, node, (i32)argument);
break;
case CMD_TAB_PREV:
- if (node) node_tab_prev(ted, node, argument);
+ if (node && argument > I32_MIN && argument < I32_MAX)
+ node_tab_prev(ted, node, (i32)argument);
break;
case CMD_TAB_SWITCH:
- if (node) node_tab_switch(ted, node, argument);
+ if (node && argument > I32_MIN && argument < I32_MAX)
+ node_tab_switch(ted, node, (i32)argument);
break;
case CMD_TAB_MOVE_LEFT: {
u16 active_tab = node->active_tab;