From d6bcd612893d9b285be2f3b7ee35da0621c64977 Mon Sep 17 00:00:00 2001 From: Leon Richardt Date: Thu, 3 Oct 2019 15:30:51 +0200 Subject: [PATCH] Fix bug regarding mentions with comma While tab-completing user names already respected the setting for mentions with commas, right-clicking user names did not. This commit adds the missing check in ChannelView::handleMouseClick. --- src/widgets/helper/ChannelView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widgets/helper/ChannelView.cpp b/src/widgets/helper/ChannelView.cpp index d4c3bc00e..7ff6098e6 100644 --- a/src/widgets/helper/ChannelView.cpp +++ b/src/widgets/helper/ChannelView.cpp @@ -1506,7 +1506,8 @@ void ChannelView::handleMouseClick(QMouseEvent *event, auto &link = hoveredElement->getLink(); if (link.type == Link::UserInfo) { - insertText("@" + link.value + ", "); + const bool commaMention = getSettings()->mentionUsersWithComma; + insertText("@" + link.value + (commaMention ? ", " : " ")); } else if (link.type == Link::UserWhisper) {