Merge pull request #8 from kmarius/patch-1

Preserve registers when deleting whitespace at EOF
main
jmp 2 years ago committed by GitHub
commit 9b15a0eb12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -59,7 +59,7 @@ function M.setup(opts)
vim.cmd([[:keepjumps keeppatterns %s/\s\+$//e]]) vim.cmd([[:keepjumps keeppatterns %s/\s\+$//e]])
-- delete lines @ eof -- delete lines @ eof
vim.cmd([[:keepjumps keeppatterns silent! 0;/^\%(\n*.\)\@!/,$d]]) vim.cmd([[:keepjumps keeppatterns silent! 0;/^\%(\n*.\)\@!/,$d_]])
reset_cursor_pos(cursor_pos) reset_cursor_pos(cursor_pos)
end, end,

Loading…
Cancel
Save