forked from qt-creator/qt-creator
VCS: perforce, cvs, subversion: Goto current line in blame.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user