Lines 2172-2183
Link Here
|
2172 |
_wordSelectionMode = true; |
2172 |
_wordSelectionMode = true; |
2173 |
|
2173 |
|
2174 |
// find word boundaries... |
2174 |
// find word boundaries... |
2175 |
QChar selClass = charClass(_image[i].character); |
|
|
2176 |
{ |
2175 |
{ |
2177 |
// find the start of the word |
2176 |
// find the start of the word |
2178 |
int x = bgnSel.x(); |
2177 |
int x = bgnSel.x(); |
2179 |
while ( ((x>0) || (bgnSel.y()>0 && (_lineProperties[bgnSel.y()-1] & LINE_WRAPPED) )) |
2178 |
while ( ((x>0) || (bgnSel.y()>0 && (_lineProperties[bgnSel.y()-1] & LINE_WRAPPED) )) |
2180 |
&& charClass(_image[i-1].character) == selClass ) |
2179 |
&& !isCharBoundary(_image[i-1].character) ) |
2181 |
{ |
2180 |
{ |
2182 |
i--; |
2181 |
i--; |
2183 |
if (x>0) |
2182 |
if (x>0) |
Lines 2196-2202
Link Here
|
2196 |
i = loc( endSel.x(), endSel.y() ); |
2195 |
i = loc( endSel.x(), endSel.y() ); |
2197 |
x = endSel.x(); |
2196 |
x = endSel.x(); |
2198 |
while( ((x<_usedColumns-1) || (endSel.y()<_usedLines-1 && (_lineProperties[endSel.y()] & LINE_WRAPPED) )) |
2197 |
while( ((x<_usedColumns-1) || (endSel.y()<_usedLines-1 && (_lineProperties[endSel.y()] & LINE_WRAPPED) )) |
2199 |
&& charClass(_image[i+1].character) == selClass ) |
2198 |
&& !isCharBoundary(_image[i+1].character) ) |
2200 |
{ |
2199 |
{ |
2201 |
i++; |
2200 |
i++; |
2202 |
if (x<_usedColumns-1) |
2201 |
if (x<_usedColumns-1) |
Lines 2342-2347
Link Here
|
2342 |
} |
2341 |
} |
2343 |
|
2342 |
|
2344 |
|
2343 |
|
|
|
2344 |
// Returns true upon a word boundary |
2345 |
// TODO determine if the below charClass() is actually required |
2346 |
bool TerminalDisplay::isCharBoundary(QChar qch) const |
2347 |
{ |
2348 |
if ( _wordCharacters.contains(qch, Qt::CaseInsensitive) ) return true; |
2349 |
if ( qch.isSpace() ) return true; |
2350 |
return false; |
2351 |
} |
2352 |
|
2353 |
|
2345 |
bool TerminalDisplay::focusNextPrevChild( bool next ) |
2354 |
bool TerminalDisplay::focusNextPrevChild( bool next ) |
2346 |
{ |
2355 |
{ |
2347 |
if (next) |
2356 |
if (next) |