Mercurial > vim
comparison src/ex_cmds.c @ 315:a0451524244d v7.0082
updated for version 7.0082
author | vimboss |
---|---|
date | Tue, 07 Jun 2005 21:12:49 +0000 |
parents | 006e9c8a6a8a |
children | 3ee6db0a746e |
comparison
equal
deleted
inserted
replaced
314:529f887b5cb7 | 315:a0451524244d |
---|---|
2431 alt_buf = buflist_findname(ffname); | 2431 alt_buf = buflist_findname(ffname); |
2432 if (alt_buf != NULL && alt_buf->b_ml.ml_mfp != NULL) | 2432 if (alt_buf != NULL && alt_buf->b_ml.ml_mfp != NULL) |
2433 { | 2433 { |
2434 /* Overwriting a file that is loaded in another buffer is not a | 2434 /* Overwriting a file that is loaded in another buffer is not a |
2435 * good idea. */ | 2435 * good idea. */ |
2436 EMSG(_("E139: File is loaded in another buffer")); | 2436 EMSG(_(e_bufloaded)); |
2437 goto theend; | 2437 goto theend; |
2438 } | 2438 } |
2439 } | 2439 } |
2440 | 2440 |
2441 /* | 2441 /* |
2589 #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) | 2589 #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) |
2590 if (p_confirm || cmdmod.confirm) | 2590 if (p_confirm || cmdmod.confirm) |
2591 { | 2591 { |
2592 char_u buff[IOSIZE]; | 2592 char_u buff[IOSIZE]; |
2593 | 2593 |
2594 dialog_msg(buff, _("Overwrite existing file \"%.*s\"?"), fname); | 2594 dialog_msg(buff, _("Overwrite existing file \"%s\"?"), fname); |
2595 if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) != VIM_YES) | 2595 if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) != VIM_YES) |
2596 return FAIL; | 2596 return FAIL; |
2597 eap->forceit = TRUE; | 2597 eap->forceit = TRUE; |
2598 } | 2598 } |
2599 else | 2599 else |
2719 #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) | 2719 #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) |
2720 if ((p_confirm || cmdmod.confirm) && buf->b_fname != NULL) | 2720 if ((p_confirm || cmdmod.confirm) && buf->b_fname != NULL) |
2721 { | 2721 { |
2722 char_u buff[IOSIZE]; | 2722 char_u buff[IOSIZE]; |
2723 | 2723 |
2724 dialog_msg(buff, _("'readonly' option is set for \"%.*s\".\nDo you wish to write anyway?"), | 2724 dialog_msg(buff, _("'readonly' option is set for \"%s\".\nDo you wish to write anyway?"), |
2725 buf->b_fname); | 2725 buf->b_fname); |
2726 | 2726 |
2727 if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) == VIM_YES) | 2727 if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) == VIM_YES) |
2728 { | 2728 { |
2729 /* Set forceit, to force the writing of a readonly file */ | 2729 /* Set forceit, to force the writing of a readonly file */ |