mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
one character of selection is lost when copying
This commit is contained in:
parent
c5e7b6cc3a
commit
9c65d5876a
1 changed files with 3 additions and 3 deletions
|
@ -201,7 +201,7 @@ abstract public class AbstractTextCanvasModel implements ITextCanvasModel {
|
|||
fSelectionStartCoumn = startColumn;
|
||||
fSelectionEndColumn = endColumn;
|
||||
if(fSelectionSnapshot!=null) {
|
||||
fSelectionSnapshot.setInterestWindow(0, fSeletionEndLine);
|
||||
fSelectionSnapshot.setInterestWindow(0, fSeletionEndLine+1);
|
||||
}
|
||||
int changedStart;
|
||||
int changedEnd;
|
||||
|
@ -239,7 +239,7 @@ abstract public class AbstractTextCanvasModel implements ITextCanvasModel {
|
|||
if(chars!=null) {
|
||||
text=new String(chars);
|
||||
if(line==fSeletionEndLine)
|
||||
text=text.substring(0, Math.min(fSelectionEndColumn,text.length()));
|
||||
text=text.substring(0, Math.min(fSelectionEndColumn+1,text.length()));
|
||||
if(line==fSelectionStartLine)
|
||||
text=text.substring(Math.min(fSelectionStartCoumn,text.length()));
|
||||
// get rid of the empty space at the end of the lines
|
||||
|
@ -282,7 +282,7 @@ abstract public class AbstractTextCanvasModel implements ITextCanvasModel {
|
|||
// update the observed window...
|
||||
if (fSelectionSnapshot != null)
|
||||
// todo make -1 to work!
|
||||
fSelectionSnapshot.setInterestWindow(0, fSeletionEndLine);
|
||||
fSelectionSnapshot.setInterestWindow(0, fSeletionEndLine+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue