summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-08-23 17:41:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-08-23 17:41:15 +0800
commit8fb41ccdd857005526ba0934072d501cc47dcc1c (patch)
tree306396f1072fc7fe2e9c8fdacb7ee2a8b2021cc5 /script/provider/provider.lua
parentcbf148c1f7985afcc5ff03cc675e1ea7657714a4 (diff)
downloadlua-language-server-8fb41ccdd857005526ba0934072d501cc47dcc1c.zip
cleanup
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r--script/provider/provider.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index b238a9b7..fdcaebb2 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -840,10 +840,9 @@ do
local piece = hint(uri, visible.start, visible.finish)
if piece then
for _, edit in ipairs(piece) do
- local offset = edit.where == 'left' and edit.offset - 1 or edit.offset
edits[#edits+1] = {
- newText = edit.text,
- range = files.range(uri, offset, offset)
+ text = edit.text,
+ pos = files.position(uri, edit.offset, edit.where),
}
end
end