C++ Editor: fixed cursor positioning after quickfix action.

This commit is contained in:
Erik Verbruggen
2010-09-23 18:22:07 +02:00
parent e4f805da73
commit f1de90c872
3 changed files with 27 additions and 13 deletions

View File

@@ -95,7 +95,9 @@ public:
targetFile.change(target);
targetFile.indent(Utils::ChangeSet::Range(targetPosition2, targetPosition1));
refactoring->activateEditor(m_targetFileName, targetPosition1);
const int prefixLineCount = loc.prefix().count(QLatin1Char('\n'));
refactoring->activateEditor(m_targetFileName, loc.line() + prefixLineCount,
qMax(((int) loc.column()) - 1, 0));
}
private: