comparison src/buffer.c @ 29845:349517ab7398 v9.0.0261

patch 9.0.0261: bufload() reads a file even if the name is not a file name Commit: https://github.com/vim/vim/commit/2eddbacd6dc17c84e4bdc41e60e81949a36bb973 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 25 12:45:21 2022 +0100 patch 9.0.0261: bufload() reads a file even if the name is not a file name 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 #10975)
author Bram Moolenaar <Bram@vim.org>
date Thu, 25 Aug 2022 14:00:06 +0200
parents 68ef14b21d01
children 2ed5e06e7285
comparison
equal deleted inserted replaced
29844:c16d053bd66b 29845:349517ab7398
218 modified_was_set = FALSE; 218 modified_was_set = FALSE;
219 219
220 // mark cursor position as being invalid 220 // mark cursor position as being invalid
221 curwin->w_valid = 0; 221 curwin->w_valid = 0;
222 222
223 // Read the file if there is one.
223 if (curbuf->b_ffname != NULL 224 if (curbuf->b_ffname != NULL
225 && !bt_quickfix(curbuf)
226 && !bt_nofilename(curbuf)
224 #ifdef FEAT_NETBEANS_INTG 227 #ifdef FEAT_NETBEANS_INTG
225 && netbeansReadFile 228 && netbeansReadFile
226 #endif 229 #endif
227 ) 230 )
228 { 231 {