From 5beda0d8b1d9fa7c53c6b0c5b3bfc2278c7074ae Mon Sep 17 00:00:00 2001 From: Evgeny Kurnevsky Date: Wed, 17 Sep 2025 23:15:30 +0200 Subject: [PATCH] Don't return invalid region from lsp-semantic-tokens--fontify. Currently it returns 0 . 0 which is outside of the buffer, (point-min) is 1. It's better to return nil instead because such invalid region might break other packages, i.e. indent-bars. --- lsp-semantic-tokens.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsp-semantic-tokens.el b/lsp-semantic-tokens.el index 6f7a5f6752a..33599e8f330 100644 --- a/lsp-semantic-tokens.el +++ b/lsp-semantic-tokens.el @@ -492,7 +492,7 @@ LOUDLY will be forwarded to OLD-FONTIFY-REGION as-is." (funcall old-fontify-region beg-orig end-orig loudly)) ((not (= lsp--cur-version (plist-get lsp--semantic-tokens-cache :_documentVersion))) ;; delay fontification until we have fresh tokens - '(jit-lock-bounds 0 . 0)) + nil) (t (setq old-bounds (funcall old-fontify-region beg-orig end-orig loudly)) ;; this is to prevent flickering when semantic token highlighting