diff --git a/lib/TerminalDisplay.cpp b/lib/TerminalDisplay.cpp index c526eb1c..ee1982b3 100644 --- a/lib/TerminalDisplay.cpp +++ b/lib/TerminalDisplay.cpp @@ -2236,7 +2236,7 @@ void TerminalDisplay::extendSelection( const QPoint& position ) if (i>=0 && i<=_imageSize) { selClass = charClass(QChar(static_cast(_image[i].character))); while( ((right.x()<_usedColumns-1) || (right.y()<_usedLines-1 && (_lineProperties[right.y()] & LINE_WRAPPED) )) - && charClass(QChar(static_cast(_image[i-1].character))) == selClass ) + && charClass(QChar(static_cast(_image[i+1].character))) == selClass ) { i++; if (right.x()<_usedColumns-1) right.rx()++; else {right.rx()=0; right.ry()++; } } }