Fix: Yank notifications all over copy to clipboard notifcations

This commit is contained in:
psychhim
2025-10-09 04:12:59 +05:30
parent 009b3aa8c0
commit 5fdc7ee5b6
3 changed files with 25 additions and 14 deletions

View File

@@ -161,7 +161,10 @@ vim.keymap.set('n', 'Y', function()
end)
end)
-- Visual mode: copy selection, trim trailing newline if needed
vim.keymap.set('x', 'Y', [["+y<esc>:lua require("copy_to_clipboard_fix").trim_clipboard()<CR>]])
vim.keymap.set('x', 'Y', function()
vim.cmd 'normal! y'
require('copy_to_clipboard_fix').trim_clipboard()
end, { noremap = true, silent = true })
-- [[ Paste from clipboard with line count ]]
local function paste_from_clipboard()