From 0350feedfa8adb07b6750f6d9150c26e13eae0d2 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Sun, 29 Dec 2024 15:04:44 -0500 Subject: [PATCH] fix: set default details to empty array --- lua/blink/cmp/lib/window/docs.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/blink/cmp/lib/window/docs.lua b/lua/blink/cmp/lib/window/docs.lua index 6f89f7ac..f2507013 100644 --- a/lua/blink/cmp/lib/window/docs.lua +++ b/lua/blink/cmp/lib/window/docs.lua @@ -19,10 +19,9 @@ local docs = {} --- @param opts blink.cmp.RenderDetailAndDocumentationOpts function docs.render_detail_and_documentation(opts) local detail_lines = {} - - local details = type(opts.detail) == 'string' and { opts.detail } or opts.detail + local details = type(opts.detail) == 'string' and { opts.detail } or opts.detail or {} + --- @cast details string[] details = require('blink.cmp.lib.utils').deduplicate(details) - for _, v in ipairs(details) do vim.list_extend(detail_lines, docs.split_lines(v)) end