diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-06-24 15:32:01 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-06-24 15:32:01 +0000 |
commit | f061e0befbea69304bc9e09a8d15dab36dabb024 (patch) | |
tree | b651159e169232a892bad6ceda78461e4ca850c9 /src/quickfix.c | |
parent | 8d3b8c4a8a48c5e7a8108dace0c5a2cc2a33ca10 (diff) | |
download | vim-git-f061e0befbea69304bc9e09a8d15dab36dabb024.tar.gz |
updated for version 7.2-215v7.2.215
Diffstat (limited to 'src/quickfix.c')
-rw-r--r-- | src/quickfix.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/quickfix.c b/src/quickfix.c index 3c0ed203b..5fc36bc5e 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -3411,14 +3411,15 @@ load_dummy_buffer(fname) /* Init the options. */ buf_copy_options(newbuf, BCO_ENTER | BCO_NOHELP); - /* set curwin/curbuf to buf and save a few things */ - aucmd_prepbuf(&aco, newbuf); + /* need to open the memfile before putting the buffer in a window */ + if (ml_open(newbuf) == OK) + { + /* set curwin/curbuf to buf and save a few things */ + aucmd_prepbuf(&aco, newbuf); - /* Need to set the filename for autocommands. */ - (void)setfname(curbuf, fname, NULL, FALSE); + /* Need to set the filename for autocommands. */ + (void)setfname(curbuf, fname, NULL, FALSE); - if (ml_open(curbuf) == OK) - { /* Create swap file now to avoid the ATTENTION message. */ check_need_swap(TRUE); @@ -3441,10 +3442,10 @@ load_dummy_buffer(fname) newbuf = curbuf; } } - } - /* restore curwin/curbuf and a few other things */ - aucmd_restbuf(&aco); + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + } if (!buf_valid(newbuf)) return NULL; |