From 0dc6161a109c63a4948e305761cffee2f52442ce Mon Sep 17 00:00:00 2001 From: Arthur Bonnaudet Date: Thu, 2 Jan 2025 15:00:47 +0100 Subject: [PATCH] fix(lsp): invalid access in `fzf_lsp_locations` `fzf_lsp_locations` was making an access to a nil value, for example when calling `lsp_incoming_calls` on a element that does not have any incoming calls. ref: #1664 --- lua/fzf-lua/providers/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/fzf-lua/providers/lsp.lua b/lua/fzf-lua/providers/lsp.lua index d6453ef0..0b581e9d 100644 --- a/lua/fzf-lua/providers/lsp.lua +++ b/lua/fzf-lua/providers/lsp.lua @@ -660,7 +660,7 @@ local function fzf_lsp_locations(opts, fn_contents) if not opts then return end opts = core.set_fzf_field_index(opts) opts = fn_contents(opts) - if not opts.__contents then + if not opts or not opts.__contents then core.__CTX = nil return end