On Fr, 13 Nov 2015, Christian Brabandt wrote:

> Hi Bram!
> 
> On Mi, 11 Nov 2015, Bram Moolenaar wrote:
> 
> > Currently, when I set 'selection' to exclusive, then gv works just fine.
> > Thus changing how gv works seems like the wrong solution.  It probably
> > needs to be changed where the paste happens.
> > 
> > Perhaps also add a test for gv used after a normal visual selection,
> > apparently that's missing.
> 
> Oh you are right. I will send an updated patch soon.

Updated patch attached.

Best,
Christian
-- 
Warum steht Aschermittwoch eigentlich auf dem Kalender? Abgesehen von
Ostern, Pfingsten, Weihnachten, Silvester, Geburtstag und drei Wochen
Urlaub ist doch immer Aschermittwoch.
                -- Loriot (Vicco von Bülow)

-- 
-- 
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.
diff --git a/src/normal.c b/src/normal.c
--- a/src/normal.c
+++ b/src/normal.c
@@ -9496,6 +9496,9 @@ nv_put(cap)
 	{
 	    curbuf->b_visual.vi_start = curbuf->b_op_start;
 	    curbuf->b_visual.vi_end = curbuf->b_op_end;
+	    /* need to adjust cursor position */
+	    if (*p_sel == 'e')
+		inc(&curbuf->b_visual.vi_end);
 	}
 
 	/* When all lines were selected and deleted do_put() leaves an empty
diff --git a/src/testdir/test94.in b/src/testdir/test94.in
--- a/src/testdir/test94.in
+++ b/src/testdir/test94.in
@@ -210,6 +210,21 @@ k$v$p
 :-2yank
 $v$p
 :$put ='---'
+:
+:$put =''
+:$put ='gv in exclusive select mode after operation'
+:$put ='zzz '
+:$put ='äää '
+:set selection=exclusive
+kv3lyjv3lpgvcxxx
+:$put ='---'
+:
+:$put =''
+:$put ='gv in exclusive select mode without operation'
+:$put ='zzz '
+:set selection=exclusive
+0v3lgvcxxx
+:$put ='---'
 :/^start:/+2,$w! test.out
 :q!
 ENDTEST
diff --git a/src/testdir/test94.ok b/src/testdir/test94.ok
--- a/src/testdir/test94.ok
+++ b/src/testdir/test94.ok
@@ -112,3 +112,12 @@ cc
 aaa
 
 ---
+
+gv in exclusive select mode after operation
+zzz 
+xxx 
+---
+
+gv in exclusive select mode without operation
+xxx 
+---

Raspunde prin e-mail lui