forked from qt-creator/qt-creator
TextEditor: Jump over braces inserted by the TextDocumentManipulator
Task-number: QTCREATORBUG-16946 Change-Id: I445c5698da59230f1d6ae859e6bbf20d26fc5bb9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
66f762959e
commit
1ebc364349
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user