diff options
Diffstat (limited to 'src/plugins/git/gitplugin.cpp')
-rw-r--r-- | src/plugins/git/gitplugin.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index d93b66f4f7..a6bdfbf32e 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -1055,8 +1055,12 @@ void GitPluginPrivate::blameFile() } } } - VcsBaseEditorWidget *editor = m_gitClient.annotate(state.currentFileTopLevel(), - state.relativeCurrentFile(), {}, lineNumber, extraOptions); + const FilePath fileName = FilePath::fromString(state.currentFile()).canonicalPath(); + FilePath topLevel; + VcsManager::findVersionControlForDirectory(fileName.parentDir(), &topLevel); + VcsBaseEditorWidget *editor = m_gitClient.annotate( + topLevel, fileName.relativeChildPath(topLevel).toString(), + {}, lineNumber, extraOptions); if (firstLine > 0) editor->setFirstLineNumber(firstLine); } |