--- a/src/Tools/jEdit/src/text_area_painter.scala Thu Jun 16 22:05:40 2011 +0200
+++ b/src/Tools/jEdit/src/text_area_painter.scala Thu Jun 16 22:15:35 2011 +0200
@@ -231,8 +231,11 @@
else {
var x1 = x + w
for (Text.Info(range, info) <- markup) {
- // FIXME range check!?
- val str = chunk.str.substring(range.start - chunk_offset, range.stop - chunk_offset)
+ // FIXME proper range!?
+ val str =
+ chunk.str.substring(
+ (range.start - chunk_offset) max 0,
+ (range.stop - chunk_offset) min chunk_length)
gfx.setColor(info.getOrElse(chunk_color))
if (range.contains(caret_offset)) {
val astr = new AttributedString(str)