diff --git a/src/Gui/CallTips.cpp b/src/Gui/CallTips.cpp index 701d1c4f6..fa76f61c0 100644 --- a/src/Gui/CallTips.cpp +++ b/src/Gui/CallTips.cpp @@ -579,8 +579,9 @@ void CallTipsList::callTipItemActivated(QListWidgetItem *item) QString sel = cursor.selectedText(); if (!sel.isEmpty()) { // in case the cursor moved too far on the right side - QChar ch = sel.at(sel.count()-1); - if (!ch.isLetterOrNumber()) + const QChar underscore = QLatin1Char('_'); + const QChar ch = sel.at(sel.count()-1); + if (!ch.isLetterOrNumber() && ch != underscore) cursor.movePosition(QTextCursor::Left, QTextCursor::KeepAnchor); } cursor.insertText( text );