diff options
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 4bb7a45232..8db8aaa168 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -1210,8 +1210,12 @@ int call_vim_function( if (str_arg_only) { len = 0; } else { - // Recognize a number argument, the others must be strings. + // Recognize a number argument, the others must be strings. A dash + // is a string too. vim_str2nr(argv[i], NULL, &len, STR2NR_ALL, &n, NULL, 0); + if (len == 1 && *argv[i] == '-') { + len = 0; + } } if (len != 0 && len == (int)STRLEN(argv[i])) { argvars[i].v_type = VAR_NUMBER; |