0
0
mirror of https://github.com/vim/vim.git synced 2025-11-16 23:24:03 -05:00

patch 8.2.2966: ml_get errors after recovering a file

Problem:    ml_get errors after recovering a file. (Yegappan Lakshmanan)
Solution:   Fix the cursor position after deleting lines.
This commit is contained in:
Bram Moolenaar
2021-06-09 12:33:40 +02:00
parent b55d618f19
commit e3f50ad640
2 changed files with 3 additions and 0 deletions

View File

@@ -1696,6 +1696,7 @@ ml_recover(int checkext)
&& !(curbuf->b_ml.ml_flags & ML_EMPTY)) && !(curbuf->b_ml.ml_flags & ML_EMPTY))
ml_delete(curbuf->b_ml.ml_line_count); ml_delete(curbuf->b_ml.ml_line_count);
curbuf->b_flags |= BF_RECOVERED; curbuf->b_flags |= BF_RECOVERED;
check_cursor();
recoverymode = FALSE; recoverymode = FALSE;
if (got_int) if (got_int)

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2966,
/**/ /**/
2965, 2965,
/**/ /**/