Commit 83d54356 authored by David Schulz's avatar David Schulz

Editor: Delete snippet trigger text.

Select the text that was typed to trigger the snippet before
inserting the snippet data.

Change-Id: I15a6e08321d03b56dcfe0e62bb0e317b6f0529e4
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 21d1f616
......@@ -81,7 +81,7 @@ bool TextDocumentManipulator::replace(int position, int length, const QString &t
void TextDocumentManipulator::insertCodeSnippet(int position, const QString &text)
{
auto cursor = m_textEditorWidget->textCursor();
cursor.setPosition(position);
cursor.setPosition(position, QTextCursor::KeepAnchor);
m_textEditorWidget->insertCodeSnippet(cursor, text);
}
......
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