mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Stop when position equals the start position (not always 0)
This commit is contained in:
@@ -106,7 +106,7 @@ bool OnigRegExp::Execute(const CefString& name,
|
||||
if (bestIndex == -1 || captureIndices->GetValue(1)->GetIntValue() < captureIndicesForBestIndex->GetValue(1)->GetIntValue()) {
|
||||
bestIndex = i;
|
||||
captureIndicesForBestIndex = captureIndices;
|
||||
if (captureIndices->GetValue(1)->GetIntValue() == 0) break; // If the match starts at 0, just use it!
|
||||
if (captureIndices->GetValue(1)->GetIntValue() == index->GetIntValue()) break; // If the match starts at 0, just use it!
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user