summaryrefslogtreecommitdiff
path: root/ted.c
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.c
parent0d84543e4a88b74aed0dec6a9ceab80b8e44c131 (diff)
cache buffer_lsp (improves performance a fair bit)
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ted.c b/ted.c
index 1eec19c..56df17d 100644
--- a/ted.c
+++ b/ted.c
@@ -191,6 +191,7 @@ Settings *ted_get_settings(Ted *ted, const char *path, Language language) {
}
LSP *ted_get_lsp_by_id(Ted *ted, LSPID id) {
+ if (id == 0) return NULL;
for (int i = 0; ted->lsps[i]; ++i) {
LSP *lsp = ted->lsps[i];
if (lsp->id == id)