summaryrefslogtreecommitdiff
path: root/script/files.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/files.lua')
-rw-r--r--script/files.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/script/files.lua b/script/files.lua
index 353030a4..c0bcbb20 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -392,6 +392,16 @@ function m.getOriginText(uri)
return file.originText
end
+---@param uri uri
+---@param text string
+function m.setOriginText(uri, text)
+ local file = m.fileMap[uri]
+ if not file then
+ return
+ end
+ file.originText = text
+end
+
--- 获取文件原始行表
---@param uri uri
---@return integer[]