mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
fix(insert_link): issues with cursor position (closes #147)
This commit is contained in:
@@ -653,7 +653,7 @@ telekasten.insert_link({opts})~
|
|||||||
Valid keys for {opts}
|
Valid keys for {opts}
|
||||||
|
|
||||||
i:~
|
i:~
|
||||||
If `true`, it will enter input mode by pressing the <A> key. This is useful
|
If `true`, it will enter input mode by pressing the <a> key. This is useful
|
||||||
when being used in a simple `inoremap` key mapping like shown in
|
when being used in a simple `inoremap` key mapping like shown in
|
||||||
|telekasten.mappings|.
|
|telekasten.mappings|.
|
||||||
|
|
||||||
|
|||||||
@@ -1457,9 +1457,9 @@ local function InsertLink(opts)
|
|||||||
filepath = selection.filename or selection.value,
|
filepath = selection.filename or selection.value,
|
||||||
opts,
|
opts,
|
||||||
})
|
})
|
||||||
vim.api.nvim_put({ "[[" .. pinfo.title .. "]]" }, "", true, true)
|
vim.api.nvim_put({ "[[" .. pinfo.title .. "]]" }, "", false, true)
|
||||||
if opts.i then
|
if opts.i then
|
||||||
vim.api.nvim_feedkeys("A", "m", false)
|
vim.api.nvim_feedkeys("a", "m", false)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
map("i", "<c-y>", picker_actions.yank_link(opts))
|
map("i", "<c-y>", picker_actions.yank_link(opts))
|
||||||
|
|||||||
Reference in New Issue
Block a user