From b45acfb66cd4c4474d3fd951d2a1b0fe3b63ae0b Mon Sep 17 00:00:00 2001 From: pommicket Date: Sat, 31 Dec 2022 12:12:07 -0500 Subject: better LSP request cancelling --- ted.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ted.h') diff --git a/ted.h b/ted.h index 56185fc..8b73898 100644 --- a/ted.h +++ b/ted.h @@ -367,7 +367,6 @@ enum { typedef struct { bool open; // is the autocomplete window open? - bool waiting_for_lsp; bool is_list_complete; // should the completions array be updated when more characters are typed? // what trigger caused the last request for completions: @@ -375,9 +374,11 @@ typedef struct { // or one of the TRIGGER_* constants above uint32_t trigger; + LSPID last_request_lsp; + LSPRequestID last_request_id; // when we sent the request to the LSP for completions // (this is used to figure out when we should display "Loading...") - double lsp_request_time; + double last_request_time; Autocompletion *completions; // dynamic array of all completions u32 *suggested; // dynamic array of completions to be suggested (indices into completions) -- cgit v1.2.3