0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.4.592

Problem:    When doing ":e foobar" when already editing "foobar" and 'buftype'
            is "nofile" the buffer is cleared. (Xavier de Gaye)
Solution:   Do no clear the buffer.
This commit is contained in:
Bram Moolenaar
2015-01-27 11:26:15 +01:00
parent 8a94d873aa
commit df5caa08f6
2 changed files with 9 additions and 0 deletions

View File

@@ -3529,6 +3529,13 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
#endif #endif
check_fname() == FAIL) check_fname() == FAIL)
goto theend; goto theend;
/* ":e foobar" when already editing "foobar" will reload the file.
* But when 'buftype' is "nofile" there is no file to load, so don't
* do anything. */
if (curbuf->b_p_bt[0] == 'n' && curbuf->b_p_bt[2] == 'f')
goto theend;
oldbuf = (flags & ECMD_OLDBUF); oldbuf = (flags & ECMD_OLDBUF);
} }

View File

@@ -741,6 +741,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 */
/**/
592,
/**/ /**/
591, 591,
/**/ /**/