]> granicus.if.org Git - vim/commitdiff
updated for version 7.4b.009 v7.4b.009
authorBram Moolenaar <Bram@vim.org>
Fri, 2 Aug 2013 15:22:23 +0000 (17:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 2 Aug 2013 15:22:23 +0000 (17:22 +0200)
Problem:    When setting the Visual area manually and 'selection' is
            exclusive, a yank includes one character too much. (Ingo Karkat)
Solution:   Default the Visual operation to "v". (Christian Brabandt)

src/mark.c
src/version.c

index f31f53b52791947a8f0fc6ad203a6909f2c891c5..1ac91d8b1b7ed64a30c2d2936c4522946118cae7 100644 (file)
@@ -99,14 +99,15 @@ setmark_pos(c, pos, fnum)
     }
 
 #ifdef FEAT_VISUAL
-    if (c == '<')
+    if (c == '<' || c == '>')
     {
-       curbuf->b_visual.vi_start = *pos;
-       return OK;
-    }
-    if (c == '>')
-    {
-       curbuf->b_visual.vi_end = *pos;
+       if (c == '<')
+           curbuf->b_visual.vi_start = *pos;
+       else
+           curbuf->b_visual.vi_end = *pos;
+       if (curbuf->b_visual.vi_mode == NUL)
+           /* Visual_mode has not yet been set, use a sane default. */
+           curbuf->b_visual.vi_mode = 'v';
        return OK;
     }
 #endif
index 22fc9b961b9ec378e490a496140f42a8c8612278..9b5343e9d6a48ef838fcc406ce65a1ff22692c22 100644 (file)
@@ -727,6 +727,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    9,
 /**/
     8,
 /**/