Make the copy button a little more tolerant.

This commit is contained in:
Adam Treat 2023-06-20 18:59:08 -04:00
parent 508993de75
commit ce7333029f

View File

@ -352,7 +352,7 @@ QString ResponseText::getLinkAtPosition(int position) const
bool ResponseText::tryCopyAtPosition(int position) const bool ResponseText::tryCopyAtPosition(int position) const
{ {
for (const auto &copy : m_copies) { for (const auto &copy : m_copies) {
if (position >= copy.startPos && position < copy.endPos) { if (position >= copy.startPos && position <= copy.endPos) {
QClipboard *clipboard = QGuiApplication::clipboard(); QClipboard *clipboard = QGuiApplication::clipboard();
clipboard->setText(copy.text); clipboard->setText(copy.text);
return true; return true;