Commit 5b46ae79 authored by mae's avatar mae
Browse files

Fix hangup with regular expression search and 0-size match

parent 50226793
......@@ -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())))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment