jdhao / nvim-config

A modern Neovim configuration with full battery for Python, Lua, C++, Markdown, LaTeX, and more...
MIT License
3.4k stars 502 forks source link

fix multi visual line delete issue #228

Closed jdhao closed 12 months ago

jdhao commented 12 months ago

For TextYankPost event, it includes both yank and delete, we should only restore cursor position for yank, not for delete. Otherwise, it messes up with text deletion when you visually select multiple lines and delete them. See also issue reported here: https://github.com/jdhao/nvim-config/pull/222#issuecomment-1698634645