mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-03 18:19:17 +03:00
Fix regex start desc computation for case insensitive ranges
Fixes #3345
This commit is contained in:
parent
8eb84c6f5d
commit
e9cf0f23f2
@ -952,7 +952,9 @@ private:
|
||||
case ParsedRegex::Class:
|
||||
{
|
||||
auto& character_class = m_parsed_regex.character_classes[node.value];
|
||||
if (character_class.ctypes == CharacterType::None and not character_class.negative)
|
||||
if (character_class.ctypes == CharacterType::None and
|
||||
not character_class.negative and
|
||||
not character_class.ignore_case)
|
||||
{
|
||||
for (auto& range : character_class.ranges)
|
||||
{
|
||||
@ -1440,6 +1442,11 @@ auto test_regex = UnitTest{[]{
|
||||
kak_assert(vm.exec("FooFOoBb"));
|
||||
}
|
||||
|
||||
{
|
||||
TestVM<> vm{R"((?i)[a-z]+)"};
|
||||
kak_assert(vm.exec("ABC"));
|
||||
}
|
||||
|
||||
{
|
||||
TestVM<> vm{R"([^\]]+)"};
|
||||
kak_assert(not vm.exec("a]c"));
|
||||
|
Loading…
Reference in New Issue
Block a user