From c354bc32ec1d45fb9f8634dbef1e3a6f34d66c94 Mon Sep 17 00:00:00 2001 From: Steve Poulton Date: Thu, 24 Jun 2021 20:33:24 +0100 Subject: [PATCH] Catch invalid true condition when additionalTextEdits is {} --- lua/completion.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/completion.lua b/lua/completion.lua index 149631d..0fcc206 100644 --- a/lua/completion.lua +++ b/lua/completion.lua @@ -107,7 +107,7 @@ local function applyAddtionalTextEdits(completed_item) } }) else - if item.additionalTextEdits then + if next(item.additionalTextEdits) then local bufnr = api.nvim_get_current_buf() local edits = vim.tbl_filter( function(x) return x.range.start.line ~= (lnum - 1) end,