summaryrefslogtreecommitdiff
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2009-06-24 15:32:01 +0000
committerBram Moolenaar <Bram@vim.org>2009-06-24 15:32:01 +0000
commitf061e0befbea69304bc9e09a8d15dab36dabb024 (patch)
treeb651159e169232a892bad6ceda78461e4ca850c9 /src/quickfix.c
parent8d3b8c4a8a48c5e7a8108dace0c5a2cc2a33ca10 (diff)
downloadvim-git-f061e0befbea69304bc9e09a8d15dab36dabb024.tar.gz
updated for version 7.2-215v7.2.215
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c19
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;