From 200408712bd96aafa0e7c5ec4defefd1d24371f8 Mon Sep 17 00:00:00 2001 From: Lambtho Date: Thu, 2 Dec 2021 09:55:59 +0100 Subject: [PATCH] fix: paste link after cursor --- lua/telekasten.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/telekasten.lua b/lua/telekasten.lua index 90511fc..5c110a2 100644 --- a/lua/telekasten.lua +++ b/lua/telekasten.lua @@ -120,9 +120,9 @@ local function imgFromClipboard() os.execute("xclip -selection clipboard -t image/png -o > " .. pngpath) if file_exists(pngpath) then if M.Cfg.image_link_style == "markdown" then - vim.api.nvim_put({ "![](" .. relpath .. ")" }, "", false, true) + vim.api.nvim_put({ "![](" .. relpath .. ")" }, "", true, true) else - vim.api.nvim_put({ "![[" .. pngname .. "]]" }, "", false, true) + vim.api.nvim_put({ "![[" .. pngname .. "]]" }, "", true, true) end end end @@ -475,7 +475,7 @@ local function InsertLink(opts) actions.close(prompt_bufnr) local selection = action_state.get_selected_entry() local fn = path_to_linkname(selection.value) - vim.api.nvim_put({ "[[" .. fn .. "]]" }, "", false, true) + vim.api.nvim_put({ "[[" .. fn .. "]]" }, "", true, true) if opts.i then vim.api.nvim_feedkeys("A", "m", false) end @@ -785,7 +785,7 @@ local function InsertImgLink(opts) local selection = action_state.get_selected_entry() local fn = selection.value fn = fn:gsub(M.Cfg.home .. "/", "") - vim.api.nvim_put({ "![](" .. fn .. ")" }, "", false, true) + vim.api.nvim_put({ "![](" .. fn .. ")" }, "", true, true) if opts.i then vim.api.nvim_feedkeys("A", "m", false) end