]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.362 v7.3.362
authorBram Moolenaar <Bram@vim.org>
Wed, 30 Nov 2011 16:01:58 +0000 (17:01 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 30 Nov 2011 16:01:58 +0000 (17:01 +0100)
Problem:    ml_get error when using ":g" with folded lines.
Solution:   Adjust the line number for changed_lines(). (Christian Brabandt)

src/ex_cmds.c
src/version.c

index 33021d295acb6a5591575c47d036f903f915159e..e81b4a2be4e1ee0f7a52359d7dc962ea4e59eb37 100644 (file)
@@ -820,7 +820,13 @@ do_move(line1, line2, dest)
        curwin->w_cursor.lnum = dest + (line2 - line1) + 1;
 
     if (line1 < dest)
-       changed_lines(line1, 0, dest + num_lines + 1, 0L);
+    {
+       dest += num_lines + 1;
+       last_line = curbuf->b_ml.ml_line_count;
+       if (dest > last_line + 1)
+           dest = last_line + 1;
+       changed_lines(line1, 0, dest, 0L);
+    }
     else
        changed_lines(dest + 1, 0, line1 + num_lines, 0L);
 
index 35b519885a07df29d5caaaefb02bab09efcd3c3d..99d6a79af925087b7c0e2190b03c9c989ce7f82a 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    362,
 /**/
     361,
 /**/