1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

bug 204794: [terminal] StringIndexOutOfBoundException when selecting text and doing right-click

https://bugs.eclipse.org/bugs/show_bug.cgi?id=204794
check for negative column and do not copy in that case
This commit is contained in:
Michael Scharf 2007-09-27 12:33:45 +00:00
parent da526d93c5
commit a0cde25ac6

View file

@ -228,9 +228,7 @@ abstract public class AbstractTextCanvasModel implements ITextCanvasModel {
}
public String getSelectedText() {
if(fSelectionStartLine<0 || fSelectionSnapshot==null)
return ""; //$NON-NLS-1$
if(fSelectionStartLine<0 || fSelectionSnapshot==null)
if(fSelectionStartLine<0 || fSelectionStartCoumn<0|| fSelectionSnapshot==null)
return ""; //$NON-NLS-1$
StringBuffer buffer=new StringBuffer();
for (int line = fSelectionStartLine; line <= fSeletionEndLine; line++) {