]> granicus.if.org Git - vim/commitdiff
updated for version 7.4a.007 v7.4a.007
authorBram Moolenaar <Bram@vim.org>
Tue, 9 Jul 2013 15:08:29 +0000 (17:08 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 9 Jul 2013 15:08:29 +0000 (17:08 +0200)
Problem:    After "g$" with 'virtualedit' set, "k" moves to a different
            column.  (Dimitar Dimitrov)
Solution:   Set w_curswant. (Christian Brabandt)

src/normal.c
src/version.c

index b16ac8725bd8a1e104f464e839e591b1d23164f0..762f3197be215b59f7d3dbd26ff5609a1bd48a9d 100644 (file)
@@ -8220,6 +8220,11 @@ nv_g_cmd(cap)
                        i += ((curwin->w_virtcol - width1) / width2 + 1)
                                                                     * width2;
                    coladvance((colnr_T)i);
+
+                   /* Make sure we stick in this column. */
+                   validate_virtcol();
+                   curwin->w_curswant = curwin->w_virtcol;
+                   curwin->w_set_curswant = FALSE;
 #if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
                    if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)
                    {
@@ -8228,7 +8233,6 @@ nv_g_cmd(cap)
                         * the end of the line.  We do not want to advance to
                         * the next screen line.
                         */
-                       validate_virtcol();
                        if (curwin->w_virtcol > (colnr_T)i)
                            --curwin->w_cursor.col;
                    }
index c26845e92c1b540bb2623f2f9a7afb567dfac5ac..02086c7660a795a5889c8b5e274b6b5147289e0d 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    7,
 /**/
     6,
 /**/