gbprod / yanky.nvim

Improved Yank and Put functionalities for Neovim
Do What The F*ck You Want To Public License
802 stars 22 forks source link

Unexpected pasting behaviour with Telescope picker #171

Open nikbrunner opened 4 months ago

nikbrunner commented 4 months ago

I am facing this issue (https://github.com/gbprod/yanky.nvim/issues/160) again, but only when the rest of the line is empty. The text pastes before the cursor, contrary to what I expect based on the default settings. It pastes correctly when there is content after the cursor. In thr Video i press <CR> to select.

https://github.com/gbprod/yanky.nvim/assets/46924729/52960b9f-b29d-46c7-97b2-d900a79e5c99

This is my lazy config:

local M = {}

---@type LazyPluginSpec
M.spec = {
    "gbprod/yanky.nvim",
    dependencies = { "chrisgrieser/cmp_yanky" },
    opts = {},
    keys = {
        { "<c-p>", "<Plug>(YankyPreviousEntry)" },
        { "<c-n>", "<Plug>(YankyNextEntry)" },

        { "p", "<Plug>(YankyPutAfter)", mode = { "n", "x" } },
        { "P", "<Plug>(YankyPutBefore)", mode = { "n", "x" } },

        {
            "<C-r>",
            "<cmd>Telescope yank_history theme=cursor previewer=false<cr>",
            desc = "[Y]ank History",
            mode = { "i", "n", "x" },
        },
    },
}

return M.spec

Otherwise, thank you so much for this plugin! :)

gbprod commented 3 months ago

Hey! Thanks for reporting this issue! I'll try to find how to fix it soon.