Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.9.0-beta1
-
None
-
1a1f261e7c7315e2f7c6fbcc4a990ffd2b6ff53e
Description
After copying into a named register, the contents can't be used multiple times to replace visual selections, because the first paste operation will store the visual selection in the named register. This differs from Vim, where the replaced selection text only goes to the default (") register.
Steps to reproduce
0. Open a file with a some lines of code
1. Write to register a, by typing e.g., "ay$
2. Select some other text somewhere using the VisualMode, e.g., jv2W
3. Paste register a: "ap
4. Select some other text somewhere: jv2W
5. Paste register a: "ap
6. See that the pasted text is not the text you yanked, but the text you pasted over in step 2.
Expected outcome
The register a stays the same after the first paste (step 3), so that its content is again pasted in step 5. The default register " contains the most recent pasted-over text (after steps 3 and 5, respectively).
I've attached a patch which is public domain. Following the Qt contribution guidelines was too cumbersome for me today, I'll try again when I have another patch.