Mercurial > vim
comparison runtime/doc/change.txt @ 28714:5eea8a249f86 v8.2.4881
patch 8.2.4881: "P" in Visual mode still changes some registers
Commit: https://github.com/vim/vim/commit/509142ab7a9db32114b6d0949722b9133c9c22f2
Author: Shougo Matsushita <Shougo.Matsu@gmail.com>
Date: Fri May 6 11:45:09 2022 +0100
patch 8.2.4881: "P" in Visual mode still changes some registers
Problem: "P" in Visual mode still changes some registers.
Solution: Make "P" in Visual mode not change any register. (Shougo
Matsushita, closes #10349)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 06 May 2022 13:00:03 +0200 |
parents | f73a9bdff3a3 |
children | 38698deeda58 |
comparison
equal
deleted
inserted
replaced
28713:f608d3f98e0e | 28714:5eea8a249f86 |
---|---|
1175 works well depends on the type of selection and the type of the text in the | 1175 works well depends on the type of selection and the type of the text in the |
1176 register. With blockwise selection it also depends on the size of the block | 1176 register. With blockwise selection it also depends on the size of the block |
1177 and whether the corners are on an existing character. (Implementation detail: | 1177 and whether the corners are on an existing character. (Implementation detail: |
1178 it actually works by first putting the register after the selection and then | 1178 it actually works by first putting the register after the selection and then |
1179 deleting the selection.) | 1179 deleting the selection.) |
1180 With 'p' the previously selected text is put in the unnamed register. This is | 1180 With |p| the previously selected text is put in the unnamed register (and |
1181 useful if you want to put that text somewhere else. But you cannot repeat the | 1181 possibly the selection and/or clipboard). This is useful if you want to put |
1182 same change. | 1182 that text somewhere else. But you cannot repeat the same change. |
1183 With 'P' the unnamed register is not changed, you can repeat the same change. | 1183 With |P| the unnamed register is not changed (and neither the selection or |
1184 But the deleted text cannot be used. If you do need it you can use 'p' with | 1184 clipboard), you can repeat the same change. But the deleted text cannot be |
1185 another register. E.g., yank the text to copy, Visually select the text to | 1185 used. If you do need it you can use |p| with another register. E.g., yank |
1186 replace and use "0p . You can repeat this as many times as you like, and the | 1186 the text to copy, Visually select the text to replace and use "0p . You can |
1187 unnamed register will be changed each time. | 1187 repeat this as many times as you like, and the unnamed register will be |
1188 changed each time. | |
1188 | 1189 |
1189 When you use a blockwise Visual mode command and yank only a single line into | 1190 When you use a blockwise Visual mode command and yank only a single line into |
1190 a register, a paste on a visual selected area will paste that single line on | 1191 a register, a paste on a visual selected area will paste that single line on |
1191 each of the selected lines (thus replacing the blockwise selected region by a | 1192 each of the selected lines (thus replacing the blockwise selected region by a |
1192 block of the pasted line). | 1193 block of the pasted line). |