VCS: perforce, cvs, subversion: Goto current line in blame.

This commit is contained in:
Friedemann Kleint
2009-10-01 17:32:26 +02:00
parent 9ed075c60c
commit 01877b2c86
8 changed files with 58 additions and 9 deletions

View File

@@ -760,14 +760,17 @@ void CVSPlugin::annotate(const QString &file)
// Re-use an existing view if possible to support
// the common usage pattern of continuously changing and diffing a file
const int lineNumber = VCSBase::VCSBaseEditor::lineNumberOfCurrentEditor(file);
if (Core::IEditor *editor = locateEditor("annotateFileName", file)) {
editor->createNew(response.stdOut);
VCSBase::VCSBaseEditor::gotoLineOfEditor(editor, lineNumber);
Core::EditorManager::instance()->activateEditor(editor);
} else {
const QString title = QString::fromLatin1("cvs annotate %1").arg(QFileInfo(file).fileName());
Core::IEditor *newEditor = showOutputInEditor(title, response.stdOut, VCSBase::AnnotateOutput, file, codec);
newEditor->setProperty("annotateFileName", file);
VCSBase::VCSBaseEditor::gotoLineOfEditor(newEditor, lineNumber);
}
}