forked from qt-creator/qt-creator
TextEditor: Fix code completion and pasting in snippets.
Fixes case 2 and 3 of QTCREATORBUG-14633. Task-number: QTCREATORBUG-14633 Change-Id: I19bf3c81c26f8a89a508591b0e7264251e0e6254 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
committed by
David Schulz
parent
9c8eeaccd0
commit
5088f07f39
@@ -6349,6 +6349,13 @@ void TextEditorWidget::unCommentSelection()
|
||||
Utils::unCommentSelection(this, d->m_commentDefinition);
|
||||
}
|
||||
|
||||
void TextEditorWidget::encourageApply()
|
||||
{
|
||||
if (!d->m_snippetOverlay->isVisible() || d->m_snippetOverlay->isEmpty())
|
||||
return;
|
||||
d->m_snippetOverlay->updateEquivalentSelections(textCursor());
|
||||
}
|
||||
|
||||
void TextEditorWidget::showEvent(QShowEvent* e)
|
||||
{
|
||||
triggerPendingUpdates();
|
||||
@@ -6584,6 +6591,7 @@ void TextEditorWidget::copy()
|
||||
void TextEditorWidget::paste()
|
||||
{
|
||||
QPlainTextEdit::paste();
|
||||
encourageApply();
|
||||
}
|
||||
|
||||
void TextEditorWidgetPrivate::collectToCircularClipboard()
|
||||
|
||||
Reference in New Issue
Block a user