Mercurial > vim
comparison src/fileio.c @ 1923:3eb34a777f49 v7.2.220
updated for version 7.2-220
author | vimboss |
---|---|
date | Wed, 01 Jul 2009 15:13:56 +0000 |
parents | eac2556d4620 |
children | 40a8e388692b |
comparison
equal
deleted
inserted
replaced
1922:e65e50609469 | 1923:3eb34a777f49 |
---|---|
8439 aucmd_win->w_buffer = buf; | 8439 aucmd_win->w_buffer = buf; |
8440 ++buf->b_nwindows; | 8440 ++buf->b_nwindows; |
8441 win_init_empty(aucmd_win); /* set cursor and topline to safe values */ | 8441 win_init_empty(aucmd_win); /* set cursor and topline to safe values */ |
8442 | 8442 |
8443 #ifdef FEAT_WINDOWS | 8443 #ifdef FEAT_WINDOWS |
8444 /* Split the current window, put the aucmd_win in the upper half. */ | 8444 /* Split the current window, put the aucmd_win in the upper half. |
8445 * We don't want the BufEnter or WinEnter autocommands. */ | |
8446 block_autocmds(); | |
8445 make_snapshot(SNAP_AUCMD_IDX); | 8447 make_snapshot(SNAP_AUCMD_IDX); |
8446 save_ea = p_ea; | 8448 save_ea = p_ea; |
8447 p_ea = FALSE; | 8449 p_ea = FALSE; |
8448 (void)win_split_ins(0, WSP_TOP, aucmd_win, 0); | 8450 (void)win_split_ins(0, WSP_TOP, aucmd_win, 0); |
8449 (void)win_comp_pos(); /* recompute window positions */ | 8451 (void)win_comp_pos(); /* recompute window positions */ |
8450 p_ea = save_ea; | 8452 p_ea = save_ea; |
8453 unblock_autocmds(); | |
8451 #endif | 8454 #endif |
8452 curwin = aucmd_win; | 8455 curwin = aucmd_win; |
8453 } | 8456 } |
8454 curbuf = buf; | 8457 curbuf = buf; |
8455 aco->new_curwin = curwin; | 8458 aco->new_curwin = curwin; |
8472 if (aco->new_curwin == aucmd_win) | 8475 if (aco->new_curwin == aucmd_win) |
8473 { | 8476 { |
8474 --curbuf->b_nwindows; | 8477 --curbuf->b_nwindows; |
8475 #ifdef FEAT_WINDOWS | 8478 #ifdef FEAT_WINDOWS |
8476 /* Find "aucmd_win", it can't be closed, but it may be in another tab | 8479 /* Find "aucmd_win", it can't be closed, but it may be in another tab |
8477 * page. */ | 8480 * page. Do not trigger autocommands here. */ |
8481 block_autocmds(); | |
8478 if (curwin != aucmd_win) | 8482 if (curwin != aucmd_win) |
8479 { | 8483 { |
8480 tabpage_T *tp; | 8484 tabpage_T *tp; |
8481 win_T *wp; | 8485 win_T *wp; |
8482 | 8486 |
8496 (void)winframe_remove(curwin, &dummy, NULL); | 8500 (void)winframe_remove(curwin, &dummy, NULL); |
8497 win_remove(curwin, NULL); | 8501 win_remove(curwin, NULL); |
8498 last_status(FALSE); /* may need to remove last status line */ | 8502 last_status(FALSE); /* may need to remove last status line */ |
8499 restore_snapshot(SNAP_AUCMD_IDX, FALSE); | 8503 restore_snapshot(SNAP_AUCMD_IDX, FALSE); |
8500 (void)win_comp_pos(); /* recompute window positions */ | 8504 (void)win_comp_pos(); /* recompute window positions */ |
8505 unblock_autocmds(); | |
8501 | 8506 |
8502 if (win_valid(aco->save_curwin)) | 8507 if (win_valid(aco->save_curwin)) |
8503 curwin = aco->save_curwin; | 8508 curwin = aco->save_curwin; |
8504 else | 8509 else |
8505 /* Hmm, original window disappeared. Just use the first one. */ | 8510 /* Hmm, original window disappeared. Just use the first one. */ |