diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-26 00:40:33 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-26 00:40:33 +0800 |
commit | 66da8f7766713d89f251c21c18adb0978dc092cb (patch) | |
tree | 9dbd48a5a02c8e770bcf52c30242366635ac30c6 /script/workspace | |
parent | 7be64fa405a547b380fea6a80891a6debc64ca3b (diff) | |
download | lua-language-server-66da8f7766713d89f251c21c18adb0978dc092cb.zip |
reset opened files after load plugin
Diffstat (limited to 'script/workspace')
-rw-r--r-- | script/workspace/workspace.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index 60078975..e4f63c35 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -474,11 +474,15 @@ end ---@param scp scope function m.resetFiles(scp) local cachedUris = scp:get 'cachedUris' - if not cachedUris then - return + if cachedUris then + for uri in pairs(cachedUris) do + files.resetText(uri) + end end - for uri in pairs(cachedUris) do - files.resetText(uri) + for uri in pairs(files.openMap) do + if scope.getScope(uri) == scp then + files.resetText(uri) + end end end |