Commit 79009f55 authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Editor: leave completion mode when user pasts.

parent f6a99f61
......@@ -5407,6 +5407,10 @@ void BaseTextEditor::insertFromMimeData(const QMimeData *source)
QString text = QString::fromUtf8(source->data(QLatin1String("application/vnd.nokia.qtcreator.vblocktext")));
if (text.isEmpty())
return;
if (CompletionSupport::instance()->isActive())
setFocus();
QStringList lines = text.split(QLatin1Char('\n'));
QTextCursor cursor = textCursor();
cursor.beginEditBlock();
......@@ -5444,6 +5448,9 @@ void BaseTextEditor::insertFromMimeData(const QMimeData *source)
if (text.isEmpty())
return;
if (CompletionSupport::instance()->isActive())
setFocus();
if (!text.contains(QLatin1Char('\n')) && !text.contains(QLatin1Char('\t')))
setNextChangeIsSnippetSafe();
......
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