forked from qt-creator/qt-creator
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:
committed by
Tobias Hunger
parent
814748dbda
commit
804c94262e
@@ -267,9 +267,12 @@ void MercurialPlugin::addCurrentFile()
|
|||||||
|
|
||||||
void MercurialPlugin::annotateCurrentFile()
|
void MercurialPlugin::annotateCurrentFile()
|
||||||
{
|
{
|
||||||
|
int currentLine = -1;
|
||||||
|
if (Core::IEditor *editor = Core::EditorManager::currentEditor())
|
||||||
|
currentLine = editor->currentLine();
|
||||||
const VcsBasePluginState state = currentState();
|
const VcsBasePluginState state = currentState();
|
||||||
QTC_ASSERT(state.hasFile(), return);
|
QTC_ASSERT(state.hasFile(), return);
|
||||||
m_client->annotate(state.currentFileTopLevel(), state.relativeCurrentFile());
|
m_client->annotate(state.currentFileTopLevel(), state.relativeCurrentFile(), QString(), currentLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MercurialPlugin::diffCurrentFile()
|
void MercurialPlugin::diffCurrentFile()
|
||||||
|
|||||||
Reference in New Issue
Block a user