diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp index 98165ec70d0..5338580354c 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.cpp +++ b/src/plugins/vcsbase/vcsbaseeditor.cpp @@ -964,13 +964,17 @@ void VcsBaseEditorWidget::slotCursorPositionChanged() void VcsBaseEditorWidget::contextMenuEvent(QContextMenuEvent *e) { - QPointer menu = createStandardContextMenu(); + QPointer menu; // 'click on change-interaction' if (supportChangeLinks()) { const QTextCursor cursor = cursorForPosition(e->pos()); - if (Internal::AbstractTextCursorHandler *handler = d->findTextCursorHandler(cursor)) + if (Internal::AbstractTextCursorHandler *handler = d->findTextCursorHandler(cursor)) { + menu = new QMenu; handler->fillContextMenu(menu, d->m_parameters->type); + } } + if (!menu) + menu = createStandardContextMenu(); switch (d->m_parameters->type) { case LogOutput: // log might have diff case DiffOutput: {