mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #1188 from Shougo/vim-patch-7.4.364
vim-patch:7.4.364
This commit is contained in:
commit
1fdfe3a484
@ -1648,11 +1648,13 @@ void write_viminfo(char_u *file, int forceit)
|
||||
if (fp_in != NULL) {
|
||||
fclose(fp_in);
|
||||
|
||||
/*
|
||||
* In case of an error keep the original viminfo file.
|
||||
* Otherwise rename the newly written file.
|
||||
*/
|
||||
if (viminfo_errcnt || vim_rename(tempname, fname) == -1) {
|
||||
/* In case of an error keep the original viminfo file. Otherwise
|
||||
* rename the newly written file. Give an error if that fails. */
|
||||
if (viminfo_errcnt == 0 && vim_rename(tempname, fname) == -1) {
|
||||
viminfo_errcnt++;
|
||||
EMSG2(_("E886: Can't rename viminfo file to %s!"), fname);
|
||||
}
|
||||
if (viminfo_errcnt > 0) {
|
||||
os_remove((char *)tempname);
|
||||
}
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ static int included_patches[] = {
|
||||
367,
|
||||
//366,
|
||||
365,
|
||||
//364,
|
||||
364,
|
||||
//363,
|
||||
362,
|
||||
361,
|
||||
|
Loading…
Reference in New Issue
Block a user