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: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Nikita Baryshnikov
2013-06-13 14:33:43 +03:00
committed by Tobias Hunger
parent 814748dbda
commit 804c94262e

View File

@@ -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()