Don't skip opening brace twice when finding closing

Fixes #2367
Fixes #2129
This commit is contained in:
Jason Felice 2018-09-09 09:42:02 -04:00
parent 14f9f4c468
commit 83244af106
7 changed files with 7 additions and 1 deletions

View File

@ -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;
} }
} }

View File

@ -0,0 +1 @@
<a-i>b

View File

@ -0,0 +1 @@
((a+b)%(/)(a-b))

View File

@ -0,0 +1 @@
'(a+b)/(a-b)'

View File

@ -0,0 +1 @@
<a-a>r

View File

@ -0,0 +1 @@
%([)[a]b] [[c]d%(])

View File

@ -0,0 +1 @@
'[[a]b]' '[[c]d]'