[vim/vim] substitute: wrong text after undo of a confirmed replacement with "\r" (PR #21092)
h_east (Vim Github Repository) <[email protected]>
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <vim/vim/pull/[email protected]> |
```
Problem: When a substitution is confirmed with the "c" flag and the
replacement contains "\r", undo restores the whole original line
while the lines already produced by earlier replacements stay,
duplicating text.
Solution: Replace the line before the next confirmation prompt, so that the
line split and the replacement it belongs to end up in the same
undo block.
```
fixes: #4798
You can view, comment on, or merge this pull request online at:
https://github.com/vim/vim/pull/21092
-- Commit Summary --
* substitute: wrong text after undo of a confirmed replacement with "\r"
-- File Changes --
M src/ex_cmds.c (6)
M src/testdir/test_substitute.vim (23)
-- Patch Links --
https://github.com/vim/vim/pull/21092.patch
https://github.com/vim/vim/pull/21092.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/21092
You are receiving this because you are subscribed to this thread.
Message ID: <vim/vim/pull/[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/pull/21092%40github.com.