From 2272569c5a7c99e23139e4daf02a950d48b942df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 28 Jan 2021 20:37:54 +0800 Subject: fix increase change --- script/provider/provider.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3