From 9d04dcb7ce389c96e2c3fa1906b8896e24e65012 Mon Sep 17 00:00:00 2001 From: pommicket Date: Thu, 22 Dec 2022 15:54:56 -0500 Subject: make sure autocomplete is closed when buffer is switched --- build.c | 2 +- main.c | 1 - ted.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build.c b/build.c index 6ec8daf..3ac0001 100644 --- a/build.c +++ b/build.c @@ -13,7 +13,7 @@ static void build_stop(Ted *ted) { } arr_clear(ted->build_queue); if (ted->active_buffer == &ted->build_buffer) { - ted->active_buffer = NULL; + ted_switch_to_buffer(ted, NULL); ted_reset_active_buffer(ted); } } diff --git a/main.c b/main.c index aed6f53..0a7969c 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,5 @@ /* @TODO: -- make sure autocomplete is closed when you switch buffers - scroll through completions - figure out under which circumstances backspace should close completions - rename buffer->filename to buffer->path diff --git a/ted.c b/ted.c index 229935a..c9ac007 100644 --- a/ted.c +++ b/ted.c @@ -184,7 +184,7 @@ static void ted_reset_active_buffer(Ted *ted) { ted_switch_to_buffer(ted, &ted->buffers[node->tabs[node->active_tab]]); } else { // there's nothing to set it to - ted->active_buffer = NULL; + ted_switch_to_buffer(ted, NULL); } } -- cgit v1.2.3