1
0
forked from aniani/vim

updated for version 7.4.684

Problem:    When starting several Vim instances in diff mode, the temp files
            used may not be unique. (Issue 353)
Solution:   Add an argument to vim_tempname() to keep the file.
This commit is contained in:
Bram Moolenaar
2015-03-31 13:33:08 +02:00
parent 1ca2e361a8
commit e5c421cfd7
13 changed files with 29 additions and 24 deletions

View File

@@ -18775,7 +18775,7 @@ get_cmd_output_as_rettv(argvars, rettv, retlist)
* Write the string to a temp file, to be used for input of the shell
* command.
*/
if ((infile = vim_tempname('i')) == NULL)
if ((infile = vim_tempname('i', TRUE)) == NULL)
{
EMSG(_(e_notmp));
goto errret;
@@ -19134,7 +19134,7 @@ f_tempname(argvars, rettv)
static int x = 'A';
rettv->v_type = VAR_STRING;
rettv->vval.v_string = vim_tempname(x);
rettv->vval.v_string = vim_tempname(x, FALSE);
/* Advance 'x' to use A-Z and 0-9, so that there are at least 34 different
* names. Skip 'I' and 'O', they are used for shell redirection. */