summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'node.c')
-rw-r--r--node.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/node.c b/node.c
index f0e85e0..9a37d4a 100644
--- a/node.c
+++ b/node.c
@@ -20,6 +20,13 @@ static void node_tab_prev(Ted *ted, Node *node, i64 n) {
node_tab_next(ted, node, -n);
}
+static void node_tab_switch(Ted *ted, Node *node, i64 tab) {
+ assert(node->tabs);
+ if (tab < arr_len(node->tabs)) {
+ node_switch_to_tab(ted, node, (u16)tab);
+ }
+}
+
static void node_free(Node *node) {
arr_free(node->tabs);
memset(node, 0, sizeof *node);