fix(insert_link): issues with cursor position (closes #147)

This commit is contained in:
Thomas Lambert
2023-02-05 14:54:09 +01:00
parent cdbb40de49
commit ffefc9a9eb
2 changed files with 3 additions and 3 deletions

View File

@@ -1457,9 +1457,9 @@ local function InsertLink(opts)
filepath = selection.filename or selection.value,
opts,
})
vim.api.nvim_put({ "[[" .. pinfo.title .. "]]" }, "", true, true)
vim.api.nvim_put({ "[[" .. pinfo.title .. "]]" }, "", false, true)
if opts.i then
vim.api.nvim_feedkeys("A", "m", false)
vim.api.nvim_feedkeys("a", "m", false)
end
end)
map("i", "<c-y>", picker_actions.yank_link(opts))