summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 22:07:03 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 22:07:03 -0500
commit94ce74b998ad019e2307e4b69f006127dba775e2 (patch)
treeeee0d731cd5897f3825fb7892e5f1f670eef0a2c /buffer.c
parentf69275faee4cd3045389a98fefefb0c683757a5c (diff)
document highlights!
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/buffer.c b/buffer.c
index b4c85d5..13d3310 100644
--- a/buffer.c
+++ b/buffer.c
@@ -1430,7 +1430,7 @@ static Status buffer_insert_lines(TextBuffer *buffer, u32 where, u32 number) {
LSPDocumentID buffer_lsp_document_id(TextBuffer *buffer) {
LSP *lsp = buffer_lsp(buffer);
- return lsp_document_id(lsp, buffer->filename);
+ return lsp ? lsp_document_id(lsp, buffer->filename) : 0;
}
// LSP uses UTF-16 indices because Microsoft fucking loves UTF-16 and won't let it die