Fix hangup with regular expression search and 0-size match

This commit is contained in:
mae
2010-04-26 19:37:19 +02:00
parent 5022679311
commit 5b46ae79b5

View File

@@ -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())))