summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c3
-rw-r--r--src/testdir/test_functions.vim7
-rw-r--r--src/version.c2
3 files changed, 12 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index fba6c218fd..cfed0f327c 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -220,7 +220,10 @@ open_buffer(
// mark cursor position as being invalid
curwin->w_valid = 0;
+ // Read the file if there is one.
if (curbuf->b_ffname != NULL
+ && !bt_quickfix(curbuf)
+ && !bt_nofilename(curbuf)
#ifdef FEAT_NETBEANS_INTG
&& netbeansReadFile
#endif
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 38cd7930af..68970407ce 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -2368,6 +2368,13 @@ func Test_bufadd_bufload()
exe 'bwipe ' .. buf2
call assert_equal(0, bufexists(buf2))
+ " when 'buftype' is "nofile" then bufload() does not read the file
+ bwipe! XotherName
+ let buf = bufadd('XotherName')
+ call setbufvar(buf, '&bt', 'nofile')
+ call bufload(buf)
+ call assert_equal([''], getbufline(buf, 1, '$'))
+
bwipe someName
bwipe XotherName
call assert_equal(0, bufexists('someName'))
diff --git a/src/version.c b/src/version.c
index 02c20f03f6..867d971746 100644
--- a/src/version.c
+++ b/src/version.c
@@ -732,6 +732,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 261,
+/**/
260,
/**/
259,