diff options
author | pommicket <pommicket@gmail.com> | 2022-07-29 14:29:36 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-07-29 14:33:32 -0400 |
commit | ab65fe136f7a8739b78aaa4801a9fb761a301417 (patch) | |
tree | d9193726574c6ed7884562ad2c376bef48905b58 /autocomplete.c | |
parent | 00fce97eb96fc2f1c1bfd8daf4f795ff36cf98c0 (diff) |
per-language settings
also fixed ctrl+/ in go
Diffstat (limited to 'autocomplete.c')
-rw-r--r-- | autocomplete.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/autocomplete.c b/autocomplete.c index fb8da92..23523bd 100644 --- a/autocomplete.c +++ b/autocomplete.c @@ -1,5 +1,5 @@ -
#define AUTOCOMPLETE_NCOMPLETIONS 10 // max # of completions to show +#define AUTOCOMPLETE_NCOMPLETIONS 10 // max # of completions to show // get the thing to be completed (and what buffer it's in) // returns false if this is a read only buffer or something @@ -80,16 +80,16 @@ static void autocomplete_open(Ted *ted) { } static void autocomplete_frame(Ted *ted) { - Settings const *settings = &ted->settings; - u32 const *colors = settings->colors; - float const padding = settings->padding; char *start; TextBuffer *buffer; if (autocomplete_get(ted, &start, &buffer)) { Font *font = ted->font; float char_height = text_font_char_height(font); - + Settings const *settings = buffer_settings(buffer); + u32 const *colors = settings->colors; + float const padding = settings->padding; + char *completions[AUTOCOMPLETE_NCOMPLETIONS]; size_t ncompletions = tags_beginning_with(ted, start, completions, arr_count(completions)); float menu_width = 400, menu_height = (float)ncompletions * char_height + 2 * padding; |