From 8fb41ccdd857005526ba0934072d501cc47dcc1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 23 Aug 2021 17:41:15 +0800 Subject: cleanup --- script/provider/provider.lua | 5 ++--- 1 file 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 -- cgit v1.2.3