fixed text copying if a single word is selected
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user