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)