Commit d7e82677 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Don't request a new completion when the completion box is already visible.

parent 9c21b5a0
......@@ -1837,9 +1837,13 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e)
void BaseTextEditor::maybeRequestAutoCompletion(const QChar &ch)
{
if (ch.isLetterOrNumber() || ch == QLatin1Char('_')) {
d->m_requestAutoCompletionRevision = document()->revision();
d->m_requestAutoCompletionPosition = position();
d->m_requestAutoCompletionTimer->start();
if (CompletionSupport::instance()->isActive())
d->m_requestAutoCompletionTimer->stop();
else {
d->m_requestAutoCompletionRevision = document()->revision();
d->m_requestAutoCompletionPosition = position();
d->m_requestAutoCompletionTimer->start();
}
} else {
d->m_requestAutoCompletionTimer->stop();
emit requestAutoCompletion(editableInterface(), false);
......
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