Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Nov 15, 2023
1 parent b0fbd69 commit b3fe1dd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lua/epo/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,8 @@ local function completion_handler(_, result, ctx)
range = textEdit.insert
end
local te_startcol = charidx_without_comp(ctx.bufnr, range.start)
if te_startcol ~= start_col then
local offset = start_col - te_startcol
entry.word = textEdit.newText:sub(offset + 1)
else
entry.word = textEdit.newText
end
entry.word = te_startcol ~= start_col and textEdit.newText:sub(start_col - te_startcol + 1)
or textEdit.newText
elseif vim.tbl_get(item, 'insertText') then
entry.word = item.insertText
else
Expand Down

0 comments on commit b3fe1dd

Please sign in to comment.