Clear selection on selected text when it is not static.

CCBUG: 153372

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=941205
wilder-portage
Kurt Hindenburg 17 years ago
parent 56e071c3b9
commit 460ba919d6
  1. 4
      src/Screen.cpp
  2. 11
      src/Screen.h

@ -618,7 +618,7 @@ void Screen::checkSelection(int from, int to)
return;
int scr_TL = loc(0, history->getLines());
//Clear entire selection if it overlaps region [from, to]
if ( (selBottomRight > (from+scr_TL)) && (selTopLeft < (to+scr_TL)) )
if ( (selBottomRight >= (from+scr_TL)) && (selTopLeft <= (to+scr_TL)) )
clearSelection();
}
@ -661,7 +661,7 @@ void Screen::displayCharacter(unsigned short c)
lastPos = loc(cuX,cuY);
// check if selection is still valid.
checkSelection(cuX,cuY);
checkSelection(lastPos, lastPos);
Character& currentChar = screenLines[cuY][cuX];

@ -468,7 +468,16 @@ public:
void writeSelectionToStream(TerminalCharacterDecoder* decoder , bool
preserveLineBreaks = true) const;
/** TODO Document me */
/**
* Checks if the text between from and to is inside the current
* selection. If this is the case, the selection is cleared. The
* from and to are coordinates in the current viewable window.
* The loc(x,y) macro can be used to generate these values from a
* column,line pair.
*
* @param from The start of the area to check.
* @param to The end of the area to check
*/
void checkSelection(int from, int to);
/**

Loading…
Cancel
Save