forked from qt-creator/qt-creator
Generic highlighter fix: Re-setting the length in string detect rule after captures replacement.
Case 1 from tst_HighlighterEngine::testDynamicContexts covers this case.
This commit is contained in:
@@ -144,7 +144,10 @@ void StringDetectRule::setInsensitive(const QString &insensitive)
|
|||||||
{ m_caseSensitivity = toCaseSensitivity(!toBool(insensitive)); }
|
{ m_caseSensitivity = toCaseSensitivity(!toBool(insensitive)); }
|
||||||
|
|
||||||
void StringDetectRule::doReplaceExpressions(const QStringList &captures)
|
void StringDetectRule::doReplaceExpressions(const QStringList &captures)
|
||||||
{ replaceByCaptures(&m_string, captures); }
|
{
|
||||||
|
replaceByCaptures(&m_string, captures);
|
||||||
|
m_length = m_string.length();
|
||||||
|
}
|
||||||
|
|
||||||
bool StringDetectRule::doMatchSucceed(const QString &text,
|
bool StringDetectRule::doMatchSucceed(const QString &text,
|
||||||
const int length,
|
const int length,
|
||||||
|
Reference in New Issue
Block a user