1
0
forked from aniani/vim

updated for version 7.3.421

Problem:    Get E832 when setting 'undofile' in vimrc and there is a file to
            be edited on the command line. (Toothpik)
Solution:   Do not try reading the undo file for a file that wasn't loaded.
This commit is contained in:
Bram Moolenaar 2012-01-28 18:03:35 +01:00
parent 16c31fe1b7
commit 3c70f33440
2 changed files with 5 additions and 2 deletions

View File

@ -7527,10 +7527,11 @@ set_bool_option(opt_idx, varp, value, opt_flags)
{
/* When 'undofile' is set globally: for every buffer, otherwise
* only for the current buffer: Try to read in the undofile, if
* one exists and the buffer wasn't changed. */
* one exists and the buffer wasn't changed and the buffer was
* loaded. */
if ((curbuf == save_curbuf
|| (opt_flags & OPT_GLOBAL) || opt_flags == 0)
&& !curbufIsChanged())
&& !curbufIsChanged() && curbuf->b_ml.ml_mfp != NULL)
{
u_compute_hash(hash);
u_read_undo(NULL, hash, curbuf->b_fname);

View File

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