]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.592 v7.4.592
authorBram Moolenaar <Bram@vim.org>
Tue, 27 Jan 2015 10:26:15 +0000 (11:26 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 27 Jan 2015 10:26:15 +0000 (11:26 +0100)
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
src/version.c

index 8195eb71b80997451ea471dda4efd2b7b2eadbd9..e18a752cb0360b7a08600fc4a200714a6227425d 100644 (file)
@@ -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);
     }
 
index 33f8a97271c96434924db63774ef388aebd1e371..abf41a66b8c111fc8cde8ee818a1e9123b814610 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    592,
 /**/
     591,
 /**/