diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-31 15:33:21 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-31 15:33:21 -0500 |
commit | d7e2d3d4f13c5f6e52ad36aa890eb09a650d1238 (patch) | |
tree | 9e4d883716a34fcbaef46fe943bb35242a33b675 /node.c | |
parent | 5a7ca9106a305555922ef78c2dd84ab8779c7718 (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.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); |