summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-08-20 10:29:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-08-20 10:29:54 +0800
commite13158e0ad2412358fa186a7292460a4a0602e1f (patch)
treef4f6d70c1962febd71923c4f29a5a922105d9926 /script
parent666d25e294d41d7ec7450ff34e5cc3eb1463d3da (diff)
downloadlua-language-server-e13158e0ad2412358fa186a7292460a4a0602e1f.zip
fix
Diffstat (limited to 'script')
-rw-r--r--script/core/completion.lua2
-rw-r--r--script/files.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua
index a899ec5c..c5a375f5 100644
--- a/script/core/completion.lua
+++ b/script/core/completion.lua
@@ -902,7 +902,7 @@ local function checkUri(ast, text, offset, results)
collect[info.expect] = {
textEdit = {
start = source.start + #source[2],
- finish = source.finish - #source[2],
+ finish = offset,
newText = info.expect,
}
}
diff --git a/script/files.lua b/script/files.lua
index 2c8ea829..fa5474ef 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -184,7 +184,7 @@ function m.setText(uri, text, isTrust, instance)
await.call(function ()
await.close('update:' .. uri)
await.setID('update:' .. uri)
- await.sleep(0.2)
+ await.sleep(0.1)
if m.exists(uri) then
m.onWatch('update', uri)
end