summaryrefslogtreecommitdiff
path: root/src/plugins/mercurial
diff options
context:
space:
mode:
authorNikita Baryshnikov <nib952051@gmail.com>2013-06-13 14:33:43 +0300
committerTobias Hunger <tobias.hunger@digia.com>2013-06-13 17:17:58 +0200
commit804c94262e3a87e9f4032c79ccea62101b915156 (patch)
tree7e4e9c7a6c9f65fa06f0ede4f702b4295657e945 /src/plugins/mercurial
parent814748dbda3c056458d5e6bd93765dc48e51b0ea (diff)
downloadqt-creator-804c94262e3a87e9f4032c79ccea62101b915156.tar.gz
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>
Diffstat (limited to 'src/plugins/mercurial')
-rw-r--r--src/plugins/mercurial/mercurialplugin.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/mercurial/mercurialplugin.cpp b/src/plugins/mercurial/mercurialplugin.cpp
index 12db4d74c5..25bae0bd1e 100644
--- a/src/plugins/mercurial/mercurialplugin.cpp
+++ b/src/plugins/mercurial/mercurialplugin.cpp
@@ -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()