Commit 1ebc3643 authored by David Schulz's avatar David Schulz Committed by Orgad Shaneh

TextEditor: Jump over braces inserted by the TextDocumentManipulator

Task-number: QTCREATORBUG-16946
Change-Id: I445c5698da59230f1d6ae859e6bbf20d26fc5bb9
Reviewed-by: 's avatarNikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
Reviewed-by: 's avatarAndré Hartmann <aha_1980@gmx.de>
parent 66f76295
......@@ -7431,7 +7431,10 @@ void TextEditorWidget::keepAutoCompletionHighlight(bool keepHighlight)
void TextEditorWidget::setAutoCompleteSkipPosition(const QTextCursor &cursor)
{
QTextCursor tc = cursor;
tc.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor);
// Create a selection of the next character but keep the current position, otherwise
// the cursor would be removed from the list of automatically inserted text positions
tc.movePosition(QTextCursor::NextCharacter);
tc.movePosition(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor);
d->autocompleterHighlight(tc);
}
......
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