diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-13 20:32:29 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-13 20:32:29 +0200 |
commit | 1840a7b4e3577e617f724c9d07ccc78195cc010a (patch) | |
tree | c28d2ac066a4d3d6756b5faa469a138ca78bdc42 /src/evalfunc.c | |
parent | 16e26a31161d65baca7885c46c43ab4a48399c92 (diff) |
patch 8.2.3158: strange error message when using islocked() with a numberv8.2.3158
Problem: Strange error message when using islocked() with a number.
(Yegappan Lakshmanan)
Solution: Check that the name is empty.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 060b5bbb28..029c8a6411 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -5961,7 +5961,10 @@ f_islocked(typval_T *argvars, typval_T *rettv) if (end != NULL && lv.ll_name != NULL) { if (*end != NUL) - semsg(_(e_trailing_arg), end); + { + semsg(_(lv.ll_name == lv.ll_name_end + ? e_invarg2 : e_trailing_arg), end); + } else { if (lv.ll_tv == NULL) |