diff src/misc2.c @ 1982:b1b09b68d706 v7.2.279

updated for version 7.2-279
author vimboss
date Tue, 03 Nov 2009 15:44:21 +0000
parents 6605dca2960f
children 4869457735a9
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -156,7 +156,7 @@ coladvance2(pos, addspaces, finetune, wc
 		    || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL)
 #endif
 		    ;
-    line = ml_get_curline();
+    line = ml_get_buf(curbuf, pos->lnum, FALSE);
 
     if (wcol >= MAXCOL)
     {
@@ -332,9 +332,9 @@ coladvance2(pos, addspaces, finetune, wc
 #endif
 
 #ifdef FEAT_MBYTE
-    /* prevent cursor from moving on the trail byte */
+    /* prevent from moving onto a trail byte */
     if (has_mbyte)
-	mb_adjust_cursor();
+	mb_adjustpos(pos);
 #endif
 
     if (col < wcol)