From 8ca02b0b1d3643f58802c87578fec1973a8e846c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= <sumneko@hotmail.com>
Date: Fri, 27 Aug 2021 17:31:04 +0800
Subject: [PATCH] semantic: may fail when scrolling

---
 changelog.md                 | 1 +
 script/provider/provider.lua | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/changelog.md b/changelog.md
index e9b98ef6d..7d46a1083 100644
--- a/changelog.md
+++ b/changelog.md
@@ -17,6 +17,7 @@
 * `CHG` completion: improve misspelling results
 * `FIX` runtime errors
 * `FIX` hint: may show param-2 as `self`
+* `FIX` semantic: may fail when scrolling
 * `FIX` [#660](https://github.com/sumneko/lua-language-server/issues/660)
 
 ## 2.3.7
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 21929734a..e1bd0f4fd 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -693,8 +693,8 @@ end)
 
 proto.on('textDocument/semanticTokens/range', function (params)
     workspace.awaitReady()
-    await.close('textDocument/semanticTokens/range')
-    await.setID('textDocument/semanticTokens/range')
+    --await.close('textDocument/semanticTokens/range')
+    --await.setID('textDocument/semanticTokens/range')
     local _ <close> = progress.create(lang.script.WINDOW_PROCESSING_SEMANTIC_RANGE, 0.5)
     local core = require 'core.semantic-tokens'
     local uri = params.textDocument.uri
-- 
GitLab