diff options
Diffstat (limited to 'ted.c')
-rw-r--r-- | ted.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -66,6 +66,17 @@ Settings *ted_active_settings(Ted *ted) { return settings; } +LSP *ted_get_lsp(Ted *ted, Language lang) { + // @TODO + return ted->test_lsp; +} + +LSP *ted_get_active_lsp(Ted *ted) { + if (!ted->active_buffer) + return NULL; + return buffer_lsp(ted->active_buffer); +} + u32 ted_color(Ted *ted, ColorSetting color) { return ted_active_settings(ted)->colors[color]; } @@ -134,7 +145,7 @@ static void ted_load_fonts(Ted *ted) { void ted_switch_to_buffer(Ted *ted, TextBuffer *buffer) { TextBuffer *search_buffer = find_search_buffer(ted); ted->active_buffer = buffer; - ted->autocomplete = false; + autocomplete_close(ted); if (buffer != search_buffer) { if (ted->find) find_update(ted, true); // make sure find results are for this file @@ -173,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); } } |