Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit c354bc3

Browse files
author
Steve Poulton
committed
Catch invalid true condition when additionalTextEdits is {}
1 parent 5646ed6 commit c354bc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/completion.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ local function applyAddtionalTextEdits(completed_item)
107107
}
108108
})
109109
else
110-
if item.additionalTextEdits then
110+
if next(item.additionalTextEdits) then
111111
local bufnr = api.nvim_get_current_buf()
112112
local edits = vim.tbl_filter(
113113
function(x) return x.range.start.line ~= (lnum - 1) end,

0 commit comments

Comments
 (0)