summaryrefslogtreecommitdiff
path: root/script/files.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/files.lua')
-rw-r--r--script/files.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/script/files.lua b/script/files.lua
index 17b0e290..88b1fe32 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -381,11 +381,12 @@ function m.getAst(uri)
end
---设置文件的当前可见范围
----@param uri uri
----@param ranges range[]
-function m.setVisibles(uri, ranges)
- uri = m.getUri(uri)
+---@param originUri uri
+---@param ranges range[]
+function m.setVisibles(originUri, ranges)
+ local uri = m.getUri(originUri)
m.visible[uri] = ranges
+ m.onWatch('updateVisible', originUri)
end
---获取文件的当前可见范围