diff --git a/src/plugins/texteditor/refactoringchanges.cpp b/src/plugins/texteditor/refactoringchanges.cpp index 9a5fda951a9..c3e440dd5bb 100644 --- a/src/plugins/texteditor/refactoringchanges.cpp +++ b/src/plugins/texteditor/refactoringchanges.cpp @@ -339,7 +339,7 @@ void RefactoringFile::apply() return; { - QTextCursor c(doc); + QTextCursor c = cursor(); c.beginEditBlock(); // build indent selections now, applying the changeset will change locations