mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
commit
9a6257e3c5
1 changed files with 6 additions and 1 deletions
|
@ -1583,7 +1583,12 @@ void ChatWidget::addSmiley()
|
|||
smiley += QString(" ");
|
||||
// add preceding space when needed (not at start of text or preceding space already exists)
|
||||
QString plainText = ui->chatTextEdit->toPlainText();
|
||||
QChar start = plainText[ui->chatTextEdit->textCursor().position() - 1];
|
||||
|
||||
int startPosition = ui->chatTextEdit->textCursor().position();
|
||||
if (startPosition > 0)
|
||||
startPosition -= 1;
|
||||
|
||||
QChar start = plainText[startPosition];
|
||||
if(!ui->chatTextEdit->textCursor().atStart() && start != QChar(' '))
|
||||
smiley = QString(" ") + smiley;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue