mirror of
https://github.com/tiyn/tidy.nvim.git
synced 2025-07-06 13:17:46 +02:00
Preserve registers when deleting whitespace at EOF
I wanted to move some code from one file to another, but when I saved the register was overridden with the whitespace.
This commit is contained in:
parent
4dcb51102e
commit
093c9f0f73
@ -59,7 +59,7 @@ function M.setup(opts)
|
||||
vim.cmd([[:keepjumps keeppatterns %s/\s\+$//e]])
|
||||
|
||||
-- delete lines @ eof
|
||||
vim.cmd([[:keepjumps keeppatterns silent! 0;/^\%(\n*.\)\@!/,$d]])
|
||||
vim.cmd([[:keepjumps keeppatterns silent! 0;/^\%(\n*.\)\@!/,$d_]])
|
||||
|
||||
reset_cursor_pos(cursor_pos)
|
||||
end,
|
||||
|
Loading…
x
Reference in New Issue
Block a user