0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.2-239

This commit is contained in:
Bram Moolenaar 2009-07-22 14:23:13 +00:00
parent 363cb67afa
commit 6ec0a6c43d
2 changed files with 36 additions and 26 deletions

View File

@ -893,6 +893,7 @@ ex_diffpatch(eap)
char_u *browseFile = NULL; char_u *browseFile = NULL;
int browse_flag = cmdmod.browse; int browse_flag = cmdmod.browse;
#endif #endif
struct stat st;
#ifdef FEAT_BROWSE #ifdef FEAT_BROWSE
if (cmdmod.browse) if (cmdmod.browse)
@ -999,6 +1000,11 @@ ex_diffpatch(eap)
STRCAT(buf, ".rej"); STRCAT(buf, ".rej");
mch_remove(buf); mch_remove(buf);
/* Only continue if the output file was created. */
if (mch_stat((char *)tmp_new, &st) < 0 || st.st_size == 0)
EMSG(_("E816: Cannot read patch output"));
else
{
if (curbuf->b_fname != NULL) if (curbuf->b_fname != NULL)
{ {
newname = vim_strnsave(curbuf->b_fname, newname = vim_strnsave(curbuf->b_fname,
@ -1020,7 +1026,8 @@ ex_diffpatch(eap)
eap->arg = tmp_new; eap->arg = tmp_new;
do_exedit(eap, old_curwin); do_exedit(eap, old_curwin);
if (curwin != old_curwin) /* split must have worked */ /* check that split worked and editing tmp_new */
if (curwin != old_curwin && win_valid(old_curwin))
{ {
/* Set 'diff', 'scrollbind' on and 'wrap' off. */ /* Set 'diff', 'scrollbind' on and 'wrap' off. */
diff_win_options(curwin, TRUE); diff_win_options(curwin, TRUE);
@ -1040,6 +1047,7 @@ ex_diffpatch(eap)
} }
} }
} }
}
theend: theend:
if (tmp_orig != NULL) if (tmp_orig != NULL)

View File

@ -676,6 +676,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
239,
/**/ /**/
238, 238,
/**/ /**/