编辑:
我已经简化了这个功能并澄清了这个问题.
原始问题仍在页面下方.
已转载到vim_dev邮件列表:https://groups.google.com/forum/#!topic/vim_dev/_Rz3uVXbwsQ
报告为Neovim的错误:https:
//github.com/neovim/neovim/issues/6276
为什么光标在以下两个示例中的位置不同:
[CORRECT CURSOR POSITION]替换的结果与缓冲区中的先前更改(第3行的添加)相结合,光标位置正确地恢复到缓冲区中的第二行.
normal ggiline one is full of aaaa
set undolevels=10 " splits the change into separate undo blocks
normal Goline two is full of bbbb
set undolevels=10
normal Goline three is full of cccc
set undolevels=10
undojoin
keepjumps %s/aaaa/zzzz/
normal u
Run Code Online (Sandbox Code Playgroud)[INCORRECT CURSOR POSITION]替换的结果与缓冲区中的先前更改(第4行的添加)相关联,光标位置错误地恢复到缓冲区中的第一行(应该是第3行).
normal ggiline one is bull of aaaa
set undolevels=10 " splits the change into separate undo blocks
normal Goline …Run Code Online (Sandbox Code Playgroud)