Commits

Anonymous committed 074ddc7

updated for version 7.3.362
Problem: ml_get error when using ":g" with folded lines.
Solution: Adjust the line number for changed_lines(). (Christian Brabandt)

Comments (0)

Files changed (2)

 	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);
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    362,
+/**/
     361,
 /**/
     360,