Hi Bart!
On Di, 16 Feb 2016, Bart Malanczuk wrote:
> In the following code snippet I'm trying to replace parameter name from param
> to value, using dot register (last inserted text):
>
> function execute(param){
> var result = param.paramProcessing();
>
> 1. I place the cursor on the in first occurence of param (in the brackets)
> 2. I type `ciwvalue<ESC>` to replace param with value, and move value into
> dot register
> 3. I go to second param occurence
> 4. I type `viw".p` to select param, and replace it with value
>
> As you can see during reproduction, step #4 instead of word replacement,
> causes removal of word 'param', and leaves me in visual mode.
Hm, the dot register is special. I think, the better alternative is to
use the small delete register -
Anyhow, here is a patch.
diff --git a/src/ops.c b/src/ops.c
index 4ad982f..eee4262 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -3329,6 +3329,8 @@ do_put(
*/
if (regname == '.')
{
+ if (VIsual_active)
+ VIsual_active = FALSE;
(void)stuff_inserted((dir == FORWARD ? (count == -1 ? 'o' : 'a') :
(count == -1 ? 'O' : 'i')), count, FALSE);
/* Putting the text is done later, so can't really move the cursor to
Best,
Christian
--
Hochspannungsmast:
bes. interessante Art der Tieraufzucht
--
--
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].
For more options, visit https://groups.google.com/d/optout.