Re: [vim/vim] undo result looks wrong after substitution with "\r" and gc flag (#4798)
Henré Botha (Vim Github Repository) <[email protected]>
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <vim/vim/issues/4798/[email protected]> |
henrebotha left a comment (vim/vim#4798) This bug still exists on Vim 9.1. I can reproduce it with `vim --clean -u test.vim`. `test.vim`: ``` set nocompatible norm IAbout this bug reproduction script: This script will run a `:s` substitution command with the `c` flag. Your UI might be a little broken while it waits for you to confirm each substitution. When you see this text, simply press `y` followed by Enter to accept each substitution in turn. This is necessary in order to reproduce the bug. Afterwards, it will run `:norm u` to undo the most recent change. NOTE HOW, AFTER THE UNDO, SOME OF THIS TEXT IS DUPLICATED. THAT IS THE BUG. s/\v\. +/.\r/gc norm u ``` To emphasise what the script says: The undo is resulting in duplicated text. - The error only occurs with `set nocompatible`. - The error does not occur if you press `a` at the first substitution prompt. You have to accept suggestions to reproduce. -- Reply to this email directly or view it on GitHub: https://github.com/vim/vim/issues/4798#issuecomment-5341189315 You are receiving this because you are subscribed to this thread. Message ID: <vim/vim/issues/4798/[email protected]> -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/issues/4798/5341189315%40github.com.