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

Commit

Permalink
check offset snip is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Oct 30, 2023
1 parent 1fcb3a3 commit eae3c8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/epo/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ local function complete_ondone(bufnr)

if offset_snip then
offset_snip = completion_item.insertText:sub(col - context[args.buf].startidx + 1)
vim.snippet.expand(offset_snip)
if #offset_snip > 0 then
vim.snippet.expand(offset_snip)
end
end

if signature then
Expand Down

0 comments on commit eae3c8c

Please sign in to comment.