fixed text copying if a single word is selected

This commit is contained in:
fourtf 2018-04-10 15:52:47 +02:00
parent bcf0ebd8ef
commit d0f1ea8502

View file

@ -419,8 +419,12 @@ void MessageLayoutContainer::addSelectionText(QString &str, int from, int to)
if (first) { if (first) {
if (index + c > from) { if (index + c > from) {
ele->addCopyTextToString(str, from - index, to - from); ele->addCopyTextToString(str, from - index, to - index);
first = false; first = false;
if (index + c > to) {
break;
}
} }
} else { } else {
if (index + c > to) { if (index + c > to) {