summaryrefslogtreecommitdiff
path: root/ted.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-07-19 15:47:53 -0400
committerpommicket <pommicket@gmail.com>2023-07-19 19:03:44 -0400
commit37f6dd7f1027e82fd12c12fca6ff0bae00e4004c (patch)
treef6ff0e5745b97adb4b418075a6bd33c8a7deec35 /ted.h
parent0d84543e4a88b74aed0dec6a9ceab80b8e44c131 (diff)
cache buffer_lsp (improves performance a fair bit)
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ted.h b/ted.h
index ecd6e89..819001f 100644
--- a/ted.h
+++ b/ted.h
@@ -414,6 +414,10 @@ typedef struct {
/// which LSP this document is open in
LSPID lsp_opened_in;
+ /// determining which LSP to use for a buffer takes some work,
+ /// so we don't want to do it every single frame.
+ /// this keeps track of the last time we actually checked what the correct LSP is.
+ double last_lsp_check;
/// where in the undo history was the last write? used by \ref buffer_unsaved_changes
u32 undo_history_write_pos;