From df5caa08f62fe67f11e48771f4a5125ebc5a69b3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 27 Jan 2015 11:26:15 +0100 Subject: [PATCH] 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. --- src/ex_cmds.c | 7 +++++++ src/version.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 8195eb71b..e18a752cb 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3529,6 +3529,13 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin) #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 index 33f8a9727..abf41a66b 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 592, /**/ 591, /**/ -- 2.50.1