Don't skip opening brace twice when finding closing
Fixes #2367 Fixes #2129
This commit is contained in:
parent
14f9f4c468
commit
83244af106
|
@ -359,7 +359,7 @@ find_surrounding(const Container& container, Iterator pos,
|
||||||
first = (flags & ObjectFlags::Inner) ? res->second : res->first;
|
first = (flags & ObjectFlags::Inner) ? res->second : res->first;
|
||||||
if (flags & ObjectFlags::ToEnd) // ensure we find the matching end
|
if (flags & ObjectFlags::ToEnd) // ensure we find the matching end
|
||||||
{
|
{
|
||||||
last = res->second;
|
last = res->first;
|
||||||
level = 0;
|
level = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1
test/regression/2129-inside-parentheses/cmd
Normal file
1
test/regression/2129-inside-parentheses/cmd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<a-i>b
|
1
test/regression/2129-inside-parentheses/in
Normal file
1
test/regression/2129-inside-parentheses/in
Normal file
|
@ -0,0 +1 @@
|
||||||
|
((a+b)%(/)(a-b))
|
1
test/regression/2129-inside-parentheses/selections
Normal file
1
test/regression/2129-inside-parentheses/selections
Normal file
|
@ -0,0 +1 @@
|
||||||
|
'(a+b)/(a-b)'
|
1
test/regression/2367-surround-with-tight-nesting/cmd
Normal file
1
test/regression/2367-surround-with-tight-nesting/cmd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<a-a>r
|
1
test/regression/2367-surround-with-tight-nesting/in
Normal file
1
test/regression/2367-surround-with-tight-nesting/in
Normal file
|
@ -0,0 +1 @@
|
||||||
|
%([)[a]b] [[c]d%(])
|
|
@ -0,0 +1 @@
|
||||||
|
'[[a]b]' '[[c]d]'
|
Loading…
Reference in New Issue
Block a user