1
0
forked from aniani/vim

patch 8.2.3158: strange error message when using islocked() with a number

Problem:    Strange error message when using islocked() with a number.
            (Yegappan Lakshmanan)
Solution:   Check that the name is empty.
This commit is contained in:
Bram Moolenaar
2021-07-13 20:32:29 +02:00
parent 16e26a3116
commit 1840a7b4e3
3 changed files with 11 additions and 1 deletions

View File

@@ -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)