mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
fix: allow insert_link to newfile (closes #286)
This commit is contained in:
@@ -1280,6 +1280,9 @@ local function InsertLink(opts)
|
|||||||
actions.select_default:replace(function()
|
actions.select_default:replace(function()
|
||||||
actions.close(prompt_bufnr)
|
actions.close(prompt_bufnr)
|
||||||
local selection = action_state.get_selected_entry()
|
local selection = action_state.get_selected_entry()
|
||||||
|
if selection == nil then
|
||||||
|
selection = { filename = action_state.get_current_line() }
|
||||||
|
end
|
||||||
local pinfo = Pinfo:new({
|
local pinfo = Pinfo:new({
|
||||||
filepath = selection.filename or selection.value,
|
filepath = selection.filename or selection.value,
|
||||||
opts,
|
opts,
|
||||||
|
|||||||
Reference in New Issue
Block a user