0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.2.1263: Vim9: comperators use 'ignorecase' in Vim9 script

Problem:    Vim9: comperators use 'ignorecase' in Vim9 script.
Solution:   Ignore 'ignorecase'.  Use true and false instead of 1 and 0.
            (closes #6497)
This commit is contained in:
Bram Moolenaar
2020-07-21 21:31:00 +02:00
parent f868ba8903
commit c71f36a889
5 changed files with 43 additions and 16 deletions

View File

@@ -790,8 +790,16 @@ typval_compare(
}
}
clear_tv(typ1);
typ1->v_type = VAR_NUMBER;
typ1->vval.v_number = n1;
if (in_vim9script())
{
typ1->v_type = VAR_BOOL;
typ1->vval.v_number = n1 ? VVAL_TRUE : VVAL_FALSE;
}
else
{
typ1->v_type = VAR_NUMBER;
typ1->vval.v_number = n1;
}
return OK;
}