fix: issue with insertLink not pasting (closes #190, #192)

This commit is contained in:
Thomas Lambert
2022-12-15 09:13:46 +01:00
parent 9de25d1657
commit acc5f0e333

View File

@@ -1450,7 +1450,7 @@ local function InsertLink(opts)
actions.close(prompt_bufnr) actions.close(prompt_bufnr)
local selection = action_state.get_selected_entry() local selection = action_state.get_selected_entry()
local pinfo = Pinfo:new({ local pinfo = Pinfo:new({
filepath = selection.filename, filepath = selection.filename or selection.value,
opts, opts,
}) })
vim.api.nvim_put({ "[[" .. pinfo.title .. "]]" }, "", true, true) vim.api.nvim_put({ "[[" .. pinfo.title .. "]]" }, "", true, true)