summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-13 22:55:06 -0300
committerpommicket <pommicket@gmail.com>2023-08-13 22:55:06 -0300
commit7f60a98f9d4f8d8a34c4de03ae9277d7872033c7 (patch)
treeba459fb75c7e89930e9bfb4850547e6d81bfe726 /main.c
parent79af91046d6c9f8ddca52dee1cb72181168c0f73 (diff)
internalize Node
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/main.c b/main.c
index f4a69dd..230d987 100644
--- a/main.c
+++ b/main.c
@@ -1,6 +1,5 @@
/*
TODO:
-- public Node API
- public Selector/FileSelector API
- public Settings API
@@ -688,9 +687,9 @@ int main(int argc, char **argv) {
if (!menu_is_any_open(ted)) {
arr_foreach_ptr(ted->nodes, NodePtr, pnode) {
Node *node = *pnode;
- if (node->tabs) {
- buffer = node->tabs[node->active_tab];
- if (buffer_handle_click(ted, buffer, pos, times)) {
+ TextBuffer *tab = node_get_tab(node, node_active_tab(node));
+ if (tab) {
+ if (buffer_handle_click(ted, tab, pos, times)) {
add = false;
break;
}