diff src/normal.c @ 1469:88c0c6c9eada v7.1.184

updated for version 7.1-184
author vimboss
date Wed, 02 Jan 2008 15:26:04 +0000
parents 15154710ed57
children c87ce0b2ee2a
line wrap: on
line diff
--- a/src/normal.c
+++ b/src/normal.c
@@ -5849,12 +5849,13 @@ nv_left(cap)
 		/* When the NL before the first char has to be deleted we
 		 * put the cursor on the NUL after the previous line.
 		 * This is a very special case, be careful!
-		 * don't adjust op_end now, otherwise it won't work */
+		 * Don't adjust op_end now, otherwise it won't work. */
 		if (	   (cap->oap->op_type == OP_DELETE
 			    || cap->oap->op_type == OP_CHANGE)
 			&& !lineempty(curwin->w_cursor.lnum))
 		{
-		    ++curwin->w_cursor.col;
+		    if (*ml_get_cursor() != NUL)
+			++curwin->w_cursor.col;
 		    cap->retval |= CA_NO_ADJ_OP_END;
 		}
 		continue;