diff --git a/Telegram/SourceFiles/ui/widgets/input_fields.cpp b/Telegram/SourceFiles/ui/widgets/input_fields.cpp index 952cdf378a..1399be385d 100644 --- a/Telegram/SourceFiles/ui/widgets/input_fields.cpp +++ b/Telegram/SourceFiles/ui/widgets/input_fields.cpp @@ -1246,6 +1246,16 @@ void InputField::updatePalette() { } } } + + cursor = textCursor(); + if (!cursor.hasSelection()) { + auto format = cursor.charFormat(); + format.merge(PrepareTagFormat( + _st, + format.property(kTagProperty).toString())); + cursor.setCharFormat(format); + setTextCursor(cursor); + } } void InputField::onTouchTimer() {