Mercurial > vim
comparison src/main.c @ 1684:fc8bf5d4051a v7.2b.017
updated for version 7.2b-017
author | vimboss |
---|---|
date | Thu, 24 Jul 2008 17:34:23 +0000 |
parents | 0a908b65de1d |
children | 5950b03fc906 |
comparison
equal
deleted
inserted
replaced
1683:75dbeedddaa9 | 1684:fc8bf5d4051a |
---|---|
2527 mparm_T *parmp; | 2527 mparm_T *parmp; |
2528 { | 2528 { |
2529 int arg_idx; /* index in argument list */ | 2529 int arg_idx; /* index in argument list */ |
2530 int i; | 2530 int i; |
2531 int advance = TRUE; | 2531 int advance = TRUE; |
2532 buf_T *old_curbuf; | |
2533 | 2532 |
2534 # ifdef FEAT_AUTOCMD | 2533 # ifdef FEAT_AUTOCMD |
2535 /* | 2534 /* |
2536 * Don't execute Win/Buf Enter/Leave autocommands here | 2535 * Don't execute Win/Buf Enter/Leave autocommands here |
2537 */ | 2536 */ |
2580 if (curbuf == firstwin->w_buffer || curbuf->b_ffname == NULL) | 2579 if (curbuf == firstwin->w_buffer || curbuf->b_ffname == NULL) |
2581 { | 2580 { |
2582 curwin->w_arg_idx = arg_idx; | 2581 curwin->w_arg_idx = arg_idx; |
2583 /* Edit file from arg list, if there is one. When "Quit" selected | 2582 /* Edit file from arg list, if there is one. When "Quit" selected |
2584 * at the ATTENTION prompt close the window. */ | 2583 * at the ATTENTION prompt close the window. */ |
2585 old_curbuf = curbuf; | 2584 # ifdef HAS_SWAP_EXISTS_ACTION |
2585 swap_exists_did_quit = FALSE; | |
2586 # endif | |
2586 (void)do_ecmd(0, arg_idx < GARGCOUNT | 2587 (void)do_ecmd(0, arg_idx < GARGCOUNT |
2587 ? alist_name(&GARGLIST[arg_idx]) : NULL, | 2588 ? alist_name(&GARGLIST[arg_idx]) : NULL, |
2588 NULL, NULL, ECMD_LASTL, ECMD_HIDE); | 2589 NULL, NULL, ECMD_LASTL, ECMD_HIDE); |
2589 if (curbuf == old_curbuf) | 2590 # ifdef HAS_SWAP_EXISTS_ACTION |
2591 if (swap_exists_did_quit) | |
2590 { | 2592 { |
2593 /* abort or quit selected */ | |
2591 if (got_int || only_one_window()) | 2594 if (got_int || only_one_window()) |
2592 { | 2595 { |
2593 /* abort selected or quit and only one window */ | 2596 /* abort selected and only one window */ |
2594 did_emsg = FALSE; /* avoid hit-enter prompt */ | 2597 did_emsg = FALSE; /* avoid hit-enter prompt */ |
2595 getout(1); | 2598 getout(1); |
2596 } | 2599 } |
2597 win_close(curwin, TRUE); | 2600 win_close(curwin, TRUE); |
2598 advance = FALSE; | 2601 advance = FALSE; |
2599 } | 2602 } |
2603 # endif | |
2600 if (arg_idx == GARGCOUNT - 1) | 2604 if (arg_idx == GARGCOUNT - 1) |
2601 arg_had_last = TRUE; | 2605 arg_had_last = TRUE; |
2602 ++arg_idx; | 2606 ++arg_idx; |
2603 } | 2607 } |
2604 ui_breakcheck(); | 2608 ui_breakcheck(); |