summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-10-03 13:35:51 +0200
committerBram Moolenaar <Bram@vim.org>2012-10-03 13:35:51 +0200
commit718f007499a5d3f0ff9c0a645780133131ab2b2e (patch)
tree92ec9f2367304ec89f89313825b04e82a76b9ed1
parentd09acef44bcfa5871d6e9a2eea21c911dfbeef13 (diff)
updated for version 7.3.673v7.3.673
Problem: Using "gN" while 'selection' is "exclusive" misses one character. (Ben Fritz) Solution: Check the direction when compensating for exclusive selection. (Christian Brabandt)
-rw-r--r--src/search.c11
-rw-r--r--src/version.c2
2 files changed, 11 insertions, 2 deletions
diff --git a/src/search.c b/src/search.c
index 158cfd8f5d..d7bfc43b14 100644
--- a/src/search.c
+++ b/src/search.c
@@ -4650,8 +4650,15 @@ current_search(count, forward)
if (VIsual_active)
{
redraw_curbuf_later(INVERTED); /* update the inversion */
- if (*p_sel == 'e' && ltoreq(VIsual, curwin->w_cursor))
- inc_cursor();
+ if (*p_sel == 'e')
+ {
+ /* Correction for exclusive selection depends on the direction. */
+ if (forward && ltoreq(VIsual, curwin->w_cursor))
+ inc_cursor();
+ else if (!forward && ltoreq(curwin->w_cursor, VIsual))
+ inc(&VIsual);
+ }
+
}
#ifdef FEAT_FOLDING
diff --git a/src/version.c b/src/version.c
index cd50417553..e8fcf2c41a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -720,6 +720,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 673,
+/**/
672,
/**/
671,