diff options
| author | 2018-11-12 17:25:10 -0500 | |
|---|---|---|
| committer | 2018-11-12 17:25:10 -0500 | |
| commit | 95b08e0f5818f0e55c4e1fa4872fc823399bc3a6 (patch) | |
| tree | 5c9ee133b4c5bed222f7e97d6c72fb45c0693b71 /src | |
| parent | Add a comment (diff) | |
| download | KVIrc-95b08e0f5818f0e55c4e1fa4872fc823399bc3a6.tar.gz KVIrc-95b08e0f5818f0e55c4e1fa4872fc823399bc3a6.tar.bz2 KVIrc-95b08e0f5818f0e55c4e1fa4872fc823399bc3a6.zip | |
KviIrcView: Fix an issue with copying short text across chunks
Diffstat (limited to 'src')
| -rw-r--r-- | src/kvirc/ui/KviIrcView_events.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/kvirc/ui/KviIrcView_events.cpp b/src/kvirc/ui/KviIrcView_events.cpp index 456341124..1b7d38ace 100644 --- a/src/kvirc/ui/KviIrcView_events.cpp +++ b/src/kvirc/ui/KviIrcView_events.cpp @@ -536,10 +536,9 @@ void KviIrcView::mouseReleaseEvent(QMouseEvent * e) if(m_bShiftPressed) { bool bStarted = false; - KviIrcViewLineChunk * pC; for(unsigned int i = 0; i < tempLine->uChunkCount; i++) { - pC = &tempLine->pChunks[i]; + KviIrcViewLineChunk * pC = &tempLine->pChunks[i]; if(bStarted) { if(endChar >= (pC->iTextStart + pC->iTextLen)) @@ -562,7 +561,7 @@ void KviIrcView::mouseReleaseEvent(QMouseEvent * e) { //starts in this chunk addControlCharacter(pC, szSelectionText); - if((endChar - initChar) > pC->iTextLen) + if(endChar >= (pC->iTextLen + pC->iTextLen)) { //don't end in this chunk szSelectionText.append(tempLine->szText.mid(initChar, pC->iTextLen - (initChar - pC->iTextStart))); |
