1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

bug 206164: [terminal] StringIndexOutOfBoundsException in getSelectedText

https://bugs.eclipse.org/bugs/show_bug.cgi?id=206164
This commit is contained in:
Michael Scharf 2007-10-12 16:23:41 +00:00
parent 29fe824ee1
commit e18580df42

View file

@ -264,7 +264,7 @@ abstract public class AbstractTextCanvasModel implements ITextCanvasModel {
* @return the currently selected text
*/
private String extractSelectedText() {
if(fSelectionStartLine<0 || fSelectionStartCoumn<0|| fSelectionSnapshot==null)
if(fSelectionStartLine<0 || fSelectionStartCoumn<0 || fSelectionEndColumn<0 || fSelectionSnapshot==null)
return ""; //$NON-NLS-1$
StringBuffer buffer=new StringBuffer();
for (int line = fSelectionStartLine; line <= fSeletionEndLine; line++) {