summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-31 15:33:21 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-31 15:33:21 -0500
commitd7e2d3d4f13c5f6e52ad36aa890eb09a650d1238 (patch)
tree9e4d883716a34fcbaef46fe943bb35242a33b675 /node.c
parent5a7ca9106a305555922ef78c2dd84ab8779c7718 (diff)
fixed Ctrl+Left/Right being double-set, cleaned up core options code, auto-add-newline
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);