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/fileio.c | |
parent | 8d3b8c4a8a48c5e7a8108dace0c5a2cc2a33ca10 (diff) | |
download | vim-git-f061e0befbea69304bc9e09a8d15dab36dabb024.tar.gz |
updated for version 7.2-215v7.2.215
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/fileio.c b/src/fileio.c index 9ce41d420..61c21480a 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -710,7 +710,8 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags) #endif #ifdef UNIX /* Set swap file protection bits after creating it. */ - if (swap_mode > 0 && curbuf->b_ml.ml_mfp->mf_fname != NULL) + if (swap_mode > 0 && curbuf->b_ml.ml_mfp != NULL + && curbuf->b_ml.ml_mfp->mf_fname != NULL) (void)mch_setperm(curbuf->b_ml.ml_mfp->mf_fname, (long)swap_mode); #endif } @@ -8435,9 +8436,9 @@ aucmd_prepbuf(aco, buf) * effects, insert it in a the current tab page. * Anything related to a window (e.g., setting folds) may have * unexpected results. */ - curwin = aucmd_win; - curwin->w_buffer = buf; + aucmd_win->w_buffer = buf; ++buf->b_nwindows; + win_init_empty(aucmd_win); /* set cursor and topline to safe values */ #ifdef FEAT_WINDOWS /* Split the current window, put the aucmd_win in the upper half. */ @@ -8448,12 +8449,7 @@ aucmd_prepbuf(aco, buf) (void)win_comp_pos(); /* recompute window positions */ p_ea = save_ea; #endif - /* set cursor and topline to safe values */ - curwin_init(); -#ifdef FEAT_VERTSPLIT - curwin->w_wincol = 0; - curwin->w_width = Columns; -#endif + curwin = aucmd_win; } curbuf = buf; aco->new_curwin = curwin; |