0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.2-215

This commit is contained in:
Bram Moolenaar
2009-06-24 15:32:01 +00:00
parent 8d3b8c4a8a
commit f061e0befb
5 changed files with 55 additions and 45 deletions

View File

@@ -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;