forked from qt-creator/qt-creator
Fix hangup with regular expression search and 0-size match
This commit is contained in:
@@ -1974,6 +1974,8 @@ void BaseTextEditorPrivate::highlightSearchResults(const QTextBlock &block,
|
||||
if (idx < 0)
|
||||
break;
|
||||
l = m_searchExpr.matchedLength();
|
||||
if (l == 0)
|
||||
break;
|
||||
if ((m_findFlags & Find::IFindSupport::FindWholeWords)
|
||||
&& ((idx && text.at(idx-1).isLetterOrNumber())
|
||||
|| (idx + l < text.length() && text.at(idx + l).isLetterOrNumber())))
|
||||
|
Reference in New Issue
Block a user