]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.673 v7.3.673
authorBram Moolenaar <Bram@vim.org>
Wed, 3 Oct 2012 11:35:51 +0000 (13:35 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 3 Oct 2012 11:35:51 +0000 (13:35 +0200)
Problem:    Using "gN" while 'selection' is "exclusive" misses one character.
            (Ben Fritz)
Solution:   Check the direction when compensating for exclusive selection.
            (Christian Brabandt)

src/search.c
src/version.c

index 158cfd8f5d92d7cf883b8a726ab1be71ff56602c..d7bfc43b147584881659c98bf0589eccdf1878e8 100644 (file)
@@ -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
index cd504175537e7dd909054e4678f8685d3b1c47ea..e8fcf2c41a39c1a368bd6fbcf10da72796e9ca73 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    673,
 /**/
     672,
 /**/