diff -ru 5.5.0/jEdit/org/gjt/sp/jedit/syntax/Chunk.java 5.5.0/jEdit-patched/org/gjt/sp/jedit/syntax/Chunk.java
--- 5.5.0/jEdit/org/gjt/sp/jedit/syntax/Chunk.java 2018-04-09 01:57:24.000000000 +0200
+++ 5.5.0/jEdit-patched/org/gjt/sp/jedit/syntax/Chunk.java 2019-02-24 12:32:09.336643045 +0100
@@ -322,9 +322,9 @@
//{{{ Package private members
//{{{ Instance variables
- SyntaxStyle style;
+ public SyntaxStyle style;
// set up after init()
- float width;
+ public float width;
//}}}
//{{{ Chunk constructor
@@ -572,7 +572,7 @@
// this is either style.getBackgroundColor() or
// styles[defaultID].getBackgroundColor()
private Color background;
- private String str;
+ public String str;
private GlyphVector[] glyphs;
//}}}
diff -ru 5.5.0/jEdit/org/gjt/sp/jedit/textarea/TextArea.java 5.5.0/jEdit-patched/org/gjt/sp/jedit/textarea/TextArea.java
--- 5.5.0/jEdit/org/gjt/sp/jedit/textarea/TextArea.java 2018-04-09 01:58:01.000000000 +0200
+++ 5.5.0/jEdit-patched/org/gjt/sp/jedit/textarea/TextArea.java 2019-02-24 12:20:10.550459878 +0100
@@ -917,6 +917,11 @@
return chunkCache.getLineInfo(screenLine).physicalLine;
} //}}}
+ public Chunk getChunksOfScreenLine(int screenLine)
+ {
+ return chunkCache.getLineInfo(screenLine).chunks;
+ }
+
//{{{ getScreenLineOfOffset() method
/**
* Returns the screen (wrapped) line containing the specified offset.
diff -ru 5.5.0/jEdit/org/gjt/sp/util/SyntaxUtilities.java 5.5.0/jEdit-patched/org/gjt/sp/util/SyntaxUtilities.java
--- 5.5.0/jEdit/org/gjt/sp/util/SyntaxUtilities.java 2018-04-09 01:58:37.000000000 +0200
+++ 5.5.0/jEdit-patched/org/gjt/sp/util/SyntaxUtilities.java 2019-02-24 12:20:10.550459878 +0100
@@ -200,7 +200,24 @@
{
return loadStyles(family,size,true);
}
-
+
+ /**
+ * Extended styles derived from the user-specified style array.
+ */
+
+ public static class StyleExtender
+ {
+ public SyntaxStyle[] extendStyles(SyntaxStyle[] styles)
+ {
+ return styles;
+ }
+ }
+ volatile private static StyleExtender _styleExtender = new StyleExtender();
+ public static void setStyleExtender(StyleExtender ext)
+ {
+ _styleExtender = ext;
+ }
+
/**
* Loads the syntax styles from the properties, giving them the specified
* base font family and size.
@@ -230,9 +247,11 @@
Log.log(Log.ERROR,StandardUtilities.class,e);
}
}
-
- return styles;
+ styles[0] =
+ new SyntaxStyle(org.gjt.sp.jedit.jEdit.getColorProperty("view.fgColor", Color.BLACK),
+ null, new Font(family, 0, size));
+ return _styleExtender.extendStyles(styles);
} //}}}
-
+
private SyntaxUtilities(){}
}