mirror of
https://github.com/hyzendust/KickestEnd.nvim.git
synced 2026-02-15 00:21:15 +01:00
11 lines
294 B
Lua
11 lines
294 B
Lua
local M = {}
|
|
function M.trim_clipboard()
|
|
local content = vim.fn.getreg '+'
|
|
-- Remove single trailing newline if present
|
|
content = content:gsub('\n$', '')
|
|
vim.fn.setreg('+', content)
|
|
vim.fn.setreg('*', content)
|
|
vim.notify('Copied selection to clipboard', vim.log.levels.INFO)
|
|
end
|
|
return M
|