diff options
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index eafdd2446c..7dc95bcded 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -14030,7 +14030,7 @@ static void f_system(typval_T *argvars, typval_T *rettv) * 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()) == NULL) { EMSG(_(e_notmp)); goto done; } @@ -14231,22 +14231,8 @@ static void f_taglist(typval_T *argvars, typval_T *rettv) */ static void f_tempname(typval_T *argvars, typval_T *rettv) { - static int x = 'A'; - rettv->v_type = VAR_STRING; - rettv->vval.v_string = vim_tempname(x); - - /* 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. */ - do { - if (x == 'Z') - x = '0'; - else if (x == '9') - x = 'A'; - else { - ++x; - } - } while (x == 'I' || x == 'O'); + rettv->vval.v_string = vim_tempname(); } /* |