forked from qt-creator/qt-creator
Clang: Fix setting cursor position after dot-arrow-correction
Change-Id: I2685de00056197505c512f63f44b54b4bca81c15 Task-number: QTCREATORBUG-17697 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -45,8 +45,10 @@ bool ClangAssistProposal::isCorrective() const
|
||||
|
||||
void ClangAssistProposal::makeCorrection(TextEditor::TextEditorWidget *editorWidget)
|
||||
{
|
||||
const int oldPosition = editorWidget->position();
|
||||
editorWidget->setCursorPosition(basePosition() - 1);
|
||||
editorWidget->replace(1, QLatin1String("->"));
|
||||
editorWidget->setCursorPosition(oldPosition + 1);
|
||||
moveBasePosition(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user