mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 00:08:19 +00:00
vim-patch:9.0.0261: bufload() reads a file even if the name is not a file name (#19944)
Problem: bufload() reads a file even if the name is not a file name. (Cyker
Way)
Solution: Do not read the file when the buffer name is not a file name.
(closes vim/vim#10975)
2eddbacd6d
This commit is contained in:
@@ -224,7 +224,8 @@ int open_buffer(int read_stdin, exarg_T *eap, int flags)
|
||||
// mark cursor position as being invalid
|
||||
curwin->w_valid = 0;
|
||||
|
||||
if (curbuf->b_ffname != NULL) {
|
||||
// Read the file if there is one.
|
||||
if (curbuf->b_ffname != NULL && !bt_quickfix(curbuf) && !bt_nofilename(curbuf)) {
|
||||
#ifdef UNIX
|
||||
int save_bin = curbuf->b_p_bin;
|
||||
int perm;
|
||||
|
Reference in New Issue
Block a user