Skip to content

Commit

Permalink
fix: handle empty table in additionalTextEdits (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
eero-lehtinen authored Oct 12, 2024
1 parent 340370d commit 65e9605
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/blink/cmp/accept/text-edits.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function text_edits.apply_additional_text_edits(item)
-- LSPs can either include these in the initial response or require a resolve
-- These are used for things like auto-imports
-- todo: if the main text edit was before this text edit, do we need to compensate?
if item.additionalTextEdits ~= nil then
if item.additionalTextEdits ~= nil and next(item.additionalTextEdits) ~= nil then
text_edits.apply_text_edits(item.client_id, item.additionalTextEdits)
else
require('blink.cmp.sources.lib').resolve(item, function(resolved_item)
Expand Down

0 comments on commit 65e9605

Please sign in to comment.