# HG changeset patch # User Bram Moolenaar # Date 1422354375 -3600 # Node ID 005a6b65086666ed56531e4c8a531a3ee0cea638 # Parent 435956324539eea89a17f0409a15b588973c0cb9 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. diff --git a/src/ex_cmds.c b/src/ex_cmds.c --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3529,6 +3529,13 @@ do_ecmd(fnum, ffname, sfname, eap, newln #endif check_fname() == FAIL) 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); } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 592, +/**/ 591, /**/ 590,