diff src/normal.c @ 5600:d289f2167d70 v7.4.147

updated for version 7.4.147 Problem: Cursor moves to wrong position when using "gj" after "$" and virtual editing is active. Solution: Make "gj" behave differently when virtual editing is active. (Hirohito Higashi)
author Bram Moolenaar <bram@vim.org>
date Tue, 14 Jan 2014 13:18:58 +0100
parents 40aff213baff
children beb037a6c270
line wrap: on
line diff
--- a/src/normal.c
+++ b/src/normal.c
@@ -4644,7 +4644,10 @@ nv_screengo(oap, dir, dist)
     }
 #endif
 
-    coladvance(curwin->w_curswant);
+    if (virtual_active() && atend)
+	coladvance(MAXCOL);
+    else
+	coladvance(curwin->w_curswant);
 
 #if defined(FEAT_LINEBREAK) || defined(FEAT_MBYTE)
     if (curwin->w_cursor.col > 0 && curwin->w_p_wrap)