diff options
author | pommicket <pommicket@gmail.com> | 2022-12-23 14:55:24 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-23 14:55:24 -0500 |
commit | 214dae3a7b58077436ffd173ae9fe8f2a6d9b97b (patch) | |
tree | 3fda7c1f935eff6ce9e9f647e148296af725e819 /ted.h | |
parent | dbab768e4d0be378e65399f32f26edb4756533ce (diff) |
wait before showing "Loading..." for autocomplete
Diffstat (limited to 'ted.h')
-rw-r--r-- | ted.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -382,6 +382,10 @@ typedef struct { // which trigger character invoked this (0 if autocomplete was manually invoked) char32_t trigger_char; + // when autocomplete menu was opened + // (this is used to figure out when we should display "Loading...") + struct timespec open_time; + Autocompletion *completions; // dynamic array of all completions u32 *suggested; // dynamic array of completions to be suggested (indices into completions) BufferPos last_pos; // position of cursor last time completions were generated. if this changes, we need to recompute completions. @@ -391,6 +395,8 @@ typedef struct { typedef struct Ted { struct LSP *test_lsp; // @TODO: something better + // current time, as of the start of this frame + struct timespec frame_time; SDL_Window *window; Font *font_bold; |