From 923c67b4c5f8cfffebe5553fd13180e7fae55bdc Mon Sep 17 00:00:00 2001 From: glepnir Date: Wed, 29 Nov 2023 18:26:35 +0800 Subject: [PATCH] update --- lua/epo/init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/epo/init.lua b/lua/epo/init.lua index 2b3c188..f8576f2 100644 --- a/lua/epo/init.lua +++ b/lua/epo/init.lua @@ -250,6 +250,12 @@ local function complete_ondone(bufnr) end if cp_item.additionalTextEdits then + for _, edit in ipairs(cp_item.additionalTextEdits) do + local range = edit.range + if range.start.line == range['end'].line then + range['end'].line = range['end'].line + 1 + end + end lsp.util.apply_text_edits(cp_item.additionalTextEdits, bufnr, client.offset_encoding) end