Commit 804c9426 authored by Nikita Baryshnikov's avatar Nikita Baryshnikov Committed by Tobias Hunger
Browse files

Mercurial: annotate - goto current line

Retrieve current line from editor and provide it to the client

Task-number: QTCREATORBUG-8067
Change-Id: Ia1a8c9556ffc975cf2bed72ed790aa02f7157ffc
Reviewed-by: default avatarOrgad Shaneh <>
Reviewed-by: default avatarTobias Hunger <>
parent 814748db
......@@ -267,9 +267,12 @@ void MercurialPlugin::addCurrentFile()
void MercurialPlugin::annotateCurrentFile()
int currentLine = -1;
if (Core::IEditor *editor = Core::EditorManager::currentEditor())
currentLine = editor->currentLine();
const VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasFile(), return);
m_client->annotate(state.currentFileTopLevel(), state.relativeCurrentFile());
m_client->annotate(state.currentFileTopLevel(), state.relativeCurrentFile(), QString(), currentLine);
void MercurialPlugin::diffCurrentFile()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment