diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-28 16:35:38 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-28 16:35:38 -0500 |
commit | 52fd5e0c95da236fd14682ed8a7cfa34afbab2c0 (patch) | |
tree | 4f8ca7df068983ad6aa2de38a7862a9bb607f258 /node.c | |
parent | fb2a0b9998a599f9e8a9a1e911fd43345778f6ef (diff) |
set active_node to NULL when line buffer is active
Diffstat (limited to 'node.c')
-rw-r--r-- | node.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4,7 +4,7 @@ static void node_switch_to_tab(Ted *ted, Node *node, u16 new_tab_index) { // switch active buffer assert(node->tabs); u16 buffer_idx = node->tabs[new_tab_index]; - ted->active_buffer = &ted->buffers[buffer_idx]; + ted_switch_to_buffer(ted, &ted->buffers[buffer_idx]); } } @@ -236,7 +236,7 @@ static void node_frame(Ted *ted, Node *node, Rect r) { ted->dragging_tab_node = NULL; // stop dragging // switch to this buffer - ted_switch_to_buffer(ted, tab); + ted_switch_to_buffer(ted, &ted->buffers[tab]); } } } @@ -252,7 +252,7 @@ static void node_frame(Ted *ted, Node *node, Rect r) { // close that tab if (buffer_unsaved_changes(buffer)) { // make sure unsaved changes dialog is opened - ted_switch_to_buffer(ted, buffer_idx); + ted_switch_to_buffer(ted, buffer); command_execute(ted, CMD_TAB_CLOSE, 1); } else { if (!node_tab_close(ted, node, tab_index)) { |