mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Fixed 178485. Breakpoints can disappear from the disassembler view if they're set on the first or last line in the view.
This commit is contained in:
parent
671996ba37
commit
c0c96c265c
1 changed files with 10 additions and 1 deletions
|
@ -145,7 +145,16 @@ public class DisassemblyAnnotationModel extends AnnotationModel {
|
|||
try {
|
||||
start = fDocument.getLineOffset( instrNumber - 1 );
|
||||
if ( start > -1 ) {
|
||||
return new Position( start, document.getLineLength( instrNumber - 1 ) );
|
||||
// Avoid the document boundaries; see bugzilla 178485
|
||||
int lineLen = document.getLineLength(instrNumber - 1);
|
||||
if (start == 0) {
|
||||
start++;
|
||||
lineLen--;
|
||||
}
|
||||
if (start + lineLen == document.getLength()) {
|
||||
lineLen--;
|
||||
}
|
||||
return new Position( start, lineLen );
|
||||
}
|
||||
}
|
||||
catch( BadLocationException e ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue