bool m_receivedContentWhileWaiting;
QTimer m_automaticProposalTimer;
CompletionSettings m_settings;
+ static const QChar m_null;
};
} // TextEditor
// --------------------
// CodeAssistantPrivate
// --------------------
+const QChar CodeAssistantPrivate::m_null;
+
CodeAssistantPrivate::CodeAssistantPrivate(CodeAssistant *assistant)
: m_q(assistant)
, m_textEditor(0)
const int length = provider->activationCharSequenceLength();
if (length == 0)
continue;
- const QString &sequence = m_textEditor->textAt(m_textEditor->position() - length, length);
+ QString sequence = m_textEditor->textAt(m_textEditor->position() - length, length);
+ const int lengthDiff = length - sequence.length();
+ for (int j = 0; j < lengthDiff; ++j)
+ sequence.prepend(m_null);
if (provider->isActivationCharSequence(sequence))
return provider;
}