Mercurial > vim
comparison src/memline.c @ 24856:a81b883576d6 v8.2.2966
patch 8.2.2966: ml_get errors after recovering a file
Commit: https://github.com/vim/vim/commit/e3f50ad640fb30f27027f85a616280288bbc14ca
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 9 12:33:40 2021 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 09 Jun 2021 12:45:03 +0200 |
parents | 7334bf933510 |
children | 7e9e53a0368f |
comparison
equal
deleted
inserted
replaced
24855:723c0075e499 | 24856:a81b883576d6 |
---|---|
1694 */ | 1694 */ |
1695 while (curbuf->b_ml.ml_line_count > lnum | 1695 while (curbuf->b_ml.ml_line_count > lnum |
1696 && !(curbuf->b_ml.ml_flags & ML_EMPTY)) | 1696 && !(curbuf->b_ml.ml_flags & ML_EMPTY)) |
1697 ml_delete(curbuf->b_ml.ml_line_count); | 1697 ml_delete(curbuf->b_ml.ml_line_count); |
1698 curbuf->b_flags |= BF_RECOVERED; | 1698 curbuf->b_flags |= BF_RECOVERED; |
1699 check_cursor(); | |
1699 | 1700 |
1700 recoverymode = FALSE; | 1701 recoverymode = FALSE; |
1701 if (got_int) | 1702 if (got_int) |
1702 emsg(_("E311: Recovery Interrupted")); | 1703 emsg(_("E311: Recovery Interrupted")); |
1703 else if (error) | 1704 else if (error) |