patch 7.4.929
Problem: "gv" after paste selects one character less if 'selection' is
"exclusive".
Solution: Increment the end position. (Christian Brabandt)
diff --git a/src/normal.c b/src/normal.c
index b994056..b9170ac 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -9496,6 +9496,9 @@
{
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
index 287d9dc..aa86fc1 100644
--- a/src/testdir/test94.in
+++ b/src/testdir/test94.in
Binary files differ
diff --git a/src/testdir/test94.ok b/src/testdir/test94.ok
index a1b0378..c023922 100644
--- a/src/testdir/test94.ok
+++ b/src/testdir/test94.ok
@@ -112,3 +112,12 @@
aaa
---
+
+gv in exclusive select mode after operation
+zzz
+xxx
+---
+
+gv in exclusive select mode without operation
+xxx
+---
diff --git a/src/version.c b/src/version.c
index 77a2564..fc286b8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 929,
+/**/
928,
/**/
927,