diff options
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index eafdd2446c..3459b5c4a0 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -68,6 +68,7 @@ #include "nvim/strings.h" #include "nvim/syntax.h" #include "nvim/tag.h" +#include "nvim/tempfile.h" #include "nvim/term.h" #include "nvim/ui.h" #include "nvim/undo.h" @@ -14030,7 +14031,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 +14232,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(); } /* |