summaryrefslogtreecommitdiff
path: root/ted.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-23 14:55:24 -0500
committerpommicket <pommicket@gmail.com>2022-12-23 14:55:24 -0500
commit214dae3a7b58077436ffd173ae9fe8f2a6d9b97b (patch)
tree3fda7c1f935eff6ce9e9f647e148296af725e819 /ted.h
parentdbab768e4d0be378e65399f32f26edb4756533ce (diff)
wait before showing "Loading..." for autocomplete
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ted.h b/ted.h
index cbcc466..ddd2695 100644
--- a/ted.h
+++ b/ted.h
@@ -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;