1
0
forked from aniani/vim

patch 8.2.2497: no error when using more than one character for a register

Problem:    No error when using more than one character for a register name.
Solution:   In Vim9 script check for a single character string. (closes #7814)
            Fix that VAR_BOOL and VAR_SPECIAL are not considered equal.
This commit is contained in:
Bram Moolenaar
2021-02-10 22:23:41 +01:00
parent 5202929dab
commit 418a29f0ff
5 changed files with 46 additions and 3 deletions

View File

@@ -1069,7 +1069,9 @@ tv_equal(
return r;
}
if (tv1->v_type != tv2->v_type)
if (tv1->v_type != tv2->v_type
&& ((tv1->v_type != VAR_BOOL && tv1->v_type != VAR_SPECIAL)
|| (tv2->v_type != VAR_BOOL && tv2->v_type != VAR_SPECIAL)))
return FALSE;
switch (tv1->v_type)