Mercurial > vim
comparison src/eval.c @ 6721:7347229a646a v7.4.684
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.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 31 Mar 2015 13:33:08 +0200 |
parents | 6529590f6c43 |
children | f5b262981753 |
comparison
equal
deleted
inserted
replaced
6720:1f42458bf2e7 | 6721:7347229a646a |
---|---|
18773 { | 18773 { |
18774 /* | 18774 /* |
18775 * Write the string to a temp file, to be used for input of the shell | 18775 * Write the string to a temp file, to be used for input of the shell |
18776 * command. | 18776 * command. |
18777 */ | 18777 */ |
18778 if ((infile = vim_tempname('i')) == NULL) | 18778 if ((infile = vim_tempname('i', TRUE)) == NULL) |
18779 { | 18779 { |
18780 EMSG(_(e_notmp)); | 18780 EMSG(_(e_notmp)); |
18781 goto errret; | 18781 goto errret; |
18782 } | 18782 } |
18783 | 18783 |
19132 typval_T *rettv; | 19132 typval_T *rettv; |
19133 { | 19133 { |
19134 static int x = 'A'; | 19134 static int x = 'A'; |
19135 | 19135 |
19136 rettv->v_type = VAR_STRING; | 19136 rettv->v_type = VAR_STRING; |
19137 rettv->vval.v_string = vim_tempname(x); | 19137 rettv->vval.v_string = vim_tempname(x, FALSE); |
19138 | 19138 |
19139 /* Advance 'x' to use A-Z and 0-9, so that there are at least 34 different | 19139 /* Advance 'x' to use A-Z and 0-9, so that there are at least 34 different |
19140 * names. Skip 'I' and 'O', they are used for shell redirection. */ | 19140 * names. Skip 'I' and 'O', they are used for shell redirection. */ |
19141 do | 19141 do |
19142 { | 19142 { |