comparison src/ex_cmds.c @ 6531:005a6b650866 v7.4.592

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.
author Bram Moolenaar <bram@vim.org>
date Tue, 27 Jan 2015 11:26:15 +0100
parents f673842874b6
children 6da912e32896
comparison
equal deleted inserted replaced
6530:435956324539 6531:005a6b650866
3527 #ifdef FEAT_LISTCMDS 3527 #ifdef FEAT_LISTCMDS
3528 (flags & ECMD_ADDBUF) || 3528 (flags & ECMD_ADDBUF) ||
3529 #endif 3529 #endif
3530 check_fname() == FAIL) 3530 check_fname() == FAIL)
3531 goto theend; 3531 goto theend;
3532
3533 /* ":e foobar" when already editing "foobar" will reload the file.
3534 * But when 'buftype' is "nofile" there is no file to load, so don't
3535 * do anything. */
3536 if (curbuf->b_p_bt[0] == 'n' && curbuf->b_p_bt[2] == 'f')
3537 goto theend;
3538
3532 oldbuf = (flags & ECMD_OLDBUF); 3539 oldbuf = (flags & ECMD_OLDBUF);
3533 } 3540 }
3534 3541
3535 #ifdef FEAT_AUTOCMD 3542 #ifdef FEAT_AUTOCMD
3536 buf = curbuf; 3543 buf = curbuf;