]> granicus.if.org Git - vim/commitdiff
patch 8.2.2966: ml_get errors after recovering a file v8.2.2966
authorBram Moolenaar <Bram@vim.org>
Wed, 9 Jun 2021 10:33:40 +0000 (12:33 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 9 Jun 2021 10:33:40 +0000 (12:33 +0200)
Problem:    ml_get errors after recovering a file. (Yegappan Lakshmanan)
Solution:   Fix the cursor position after deleting lines.

src/memline.c
src/version.c

index a0b642908dfb758007626c47457d788d4ad92f09..58582c9d69db079dab39c86f9c5054ac98e6a6be 100644 (file)
@@ -1696,6 +1696,7 @@ ml_recover(int checkext)
                                       && !(curbuf->b_ml.ml_flags & ML_EMPTY))
        ml_delete(curbuf->b_ml.ml_line_count);
     curbuf->b_flags |= BF_RECOVERED;
+    check_cursor();
 
     recoverymode = FALSE;
     if (got_int)
index aee9dcff2249441c2c4df335df4070eae8ad831c..f57d6926766383a66da73d749df1ccf9d68d03f3 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2966,
 /**/
     2965,
 /**/