0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

Add the 'undoreload' option to be able to undo a file reload.

This commit is contained in:
Bram Moolenaar
2010-07-24 20:27:03 +02:00
parent 72ada0f8c2
commit 59f931ef54
16 changed files with 167 additions and 79 deletions

View File

@@ -2529,7 +2529,7 @@ ml_append(lnum, line, len, newfile)
int newfile; /* flag, see above */
{
/* When starting up, we might still need to create the memfile */
if (curbuf->b_ml.ml_mfp == NULL && open_buffer(FALSE, NULL) == FAIL)
if (curbuf->b_ml.ml_mfp == NULL && open_buffer(FALSE, NULL, 0) == FAIL)
return FAIL;
if (curbuf->b_ml.ml_line_lnum != 0)
@@ -3078,7 +3078,7 @@ ml_replace(lnum, line, copy)
return FAIL;
/* When starting up, we might still need to create the memfile */
if (curbuf->b_ml.ml_mfp == NULL && open_buffer(FALSE, NULL) == FAIL)
if (curbuf->b_ml.ml_mfp == NULL && open_buffer(FALSE, NULL, 0) == FAIL)
return FAIL;
if (copy && (line = vim_strsave(line)) == NULL) /* allocate memory */