fix: Ctrl+V pasting now handles newlines in insert mode

This commit is contained in:
Kyren223
2024-09-16 13:38:57 +03:00
parent c263f3a965
commit e4815a444f

View File

@@ -19,7 +19,7 @@ local function paste()
value = value:gsub('\n', ' ') -- replace newlines with spaces
vim.api.nvim_feedkeys(value, 'c', false)
else
vim.api.nvim_put({ value }, 'c', true, true)
vim.api.nvim_put(vim.split(value, '\n'), 'c', false, true)
end
end