summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-01-28 20:37:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-01-28 20:37:54 +0800
commit2272569c5a7c99e23139e4daf02a950d48b942df (patch)
treea7b7bb8973f13b682bd5b71c17016c2214241e70
parentdc17984bcdd5afc7f74a05234b7f7f8a5eb7766d (diff)
downloadlua-language-server-2272569c5a7c99e23139e4daf02a950d48b942df.zip
fix increase change
-rw-r--r--script/provider/provider.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 31cefbff..fdc52873 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -213,7 +213,7 @@ proto.on('textDocument/didChange', function (params)
for _, change in ipairs(changes) do
if change.range then
local start, finish = files.unrange(uri, change.range)
- text = text:sub(1, start) .. change.text .. text:sub(finish + 1)
+ text = text:sub(1, start - 1) .. change.text .. text:sub(finish)
else
text = change.text
end