From acc5f0e3337139a68155efb8c5c593ed4fcee600 Mon Sep 17 00:00:00 2001 From: Thomas Lambert Date: Thu, 15 Dec 2022 09:13:46 +0100 Subject: [PATCH] fix: issue with insertLink not pasting (closes #190, #192) --- lua/telekasten.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telekasten.lua b/lua/telekasten.lua index 7750574..17786c7 100644 --- a/lua/telekasten.lua +++ b/lua/telekasten.lua @@ -1450,7 +1450,7 @@ local function InsertLink(opts) actions.close(prompt_bufnr) local selection = action_state.get_selected_entry() local pinfo = Pinfo:new({ - filepath = selection.filename, + filepath = selection.filename or selection.value, opts, }) vim.api.nvim_put({ "[[" .. pinfo.title .. "]]" }, "", true, true)