diff options
author | Benno Baumgartner | 2008-06-05 16:28:12 +0000 |
---|---|---|
committer | Benno Baumgartner | 2008-06-05 16:28:12 +0000 |
commit | c4d9619bf5e30f1fa4e4d46135f00ceea69b3838 (patch) | |
tree | d62be1bd550af25d134708f7b301f384ad3acbdf /org.eclipse.text | |
parent | 24df46f19c4c5eacdb2f38ffaa0db22101172145 (diff) | |
download | eclipse.platform.text-c4d9619bf5e30f1fa4e4d46135f00ceea69b3838.tar.gz eclipse.platform.text-c4d9619bf5e30f1fa4e4d46135f00ceea69b3838.tar.xz eclipse.platform.text-c4d9619bf5e30f1fa4e4d46135f00ceea69b3838.zip |
235605 Range indicator (magnet) sometimes not drawnv20080605-1800R3_4
Diffstat (limited to 'org.eclipse.text')
-rw-r--r-- | org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java b/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java index 880a67c34c3..5f5b4756605 100644 --- a/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java +++ b/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java @@ -902,8 +902,14 @@ public class AnnotationModel implements IAnnotationModel, IAnnotationModelExtens if (p != null) { if (position.getOffset() != p.getOffset() || position.getLength() != p.getLength()) { + fDocument.removePosition(p); p.setOffset(position.getOffset()); p.setLength(position.getLength()); + try { + fDocument.addPosition(p); + } catch (BadLocationException e) { + // ignore invalid position + } } synchronized (getLockObject()) { getAnnotationModelEvent().annotationChanged(annotation); |