Fix v8.4.8 hanging while opening some Pascal files
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12822#issuecomment-1397862706 Fix #12822pull/12838/head
parent
6140865351
commit
63d1bbae78
|
@ -388,15 +388,15 @@ void FunctionParser::funcParse(std::vector<foundInfo> & foundInfos, size_t begin
|
||||||
int flags = SCFIND_REGEXP | SCFIND_POSIX | SCFIND_REGEXP_DOTMATCHESNL;
|
int flags = SCFIND_REGEXP | SCFIND_POSIX | SCFIND_REGEXP_DOTMATCHESNL;
|
||||||
|
|
||||||
(*ppEditView)->execute(SCI_SETSEARCHFLAGS, flags);
|
(*ppEditView)->execute(SCI_SETSEARCHFLAGS, flags);
|
||||||
size_t targetStart = (*ppEditView)->searchInTarget(_functionExpr.c_str(), _functionExpr.length(), begin, end);
|
intptr_t targetStart = (*ppEditView)->searchInTarget(_functionExpr.c_str(), _functionExpr.length(), begin, end);
|
||||||
size_t targetEnd = 0;
|
intptr_t targetEnd = 0;
|
||||||
|
|
||||||
//foundInfos.clear();
|
//foundInfos.clear();
|
||||||
while (targetStart >= 0)
|
while (targetStart >= 0)
|
||||||
{
|
{
|
||||||
targetStart = (*ppEditView)->execute(SCI_GETTARGETSTART);
|
targetStart = (*ppEditView)->execute(SCI_GETTARGETSTART);
|
||||||
targetEnd = (*ppEditView)->execute(SCI_GETTARGETEND);
|
targetEnd = (*ppEditView)->execute(SCI_GETTARGETEND);
|
||||||
if (targetEnd > end) //we found a result but outside our range, therefore do not process it
|
if (targetEnd > static_cast<intptr_t>(end)) //we found a result but outside our range, therefore do not process it
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue