diff src/ex_cmds.c @ 1929:9230c45fdde6 v7.2.226

updated for version 7.2-226
author vimboss
date Thu, 09 Jul 2009 18:06:49 +0000
parents c8f343a465a2
children e038754d419a
line wrap: on
line diff
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -4013,6 +4013,9 @@ ex_change(eap)
 	    break;
 	ml_delete(eap->line1, FALSE);
     }
+
+    /* make sure the cursor is not beyond the end of the file now */
+    check_cursor_lnum();
     deleted_lines_mark(eap->line1, (long)(eap->line2 - lnum));
 
     /* ":append" on the line above the deleted lines. */