author | wenzelm |
Tue, 08 Sep 2020 21:14:42 +0200 | |
changeset 72247 | c06260b7152c |
parent 71932 | 65fd0f032a75 |
child 73653 | d9823224fcfe |
permissions | -rw-r--r-- |
72247 | 1 |
diff -ru 5.6.0/jEdit-orig/org/gjt/sp/jedit/syntax/Chunk.java 5.6.0/jEdit-patched/org/gjt/sp/jedit/syntax/Chunk.java |
2 |
--- 5.6.0/jEdit-orig/org/gjt/sp/jedit/syntax/Chunk.java 2020-09-03 05:31:01.000000000 +0200 |
|
3 |
+++ 5.6.0/jEdit-patched/org/gjt/sp/jedit/syntax/Chunk.java 2020-09-08 20:13:23.565140195 +0200 |
|
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
4 |
@@ -332,9 +332,9 @@ |
50306 | 5 |
//{{{ Package private members |
6 |
||
7 |
//{{{ Instance variables |
|
8 |
- SyntaxStyle style; |
|
9 |
+ public SyntaxStyle style; |
|
10 |
// set up after init() |
|
11 |
- float width; |
|
12 |
+ public float width; |
|
13 |
//}}} |
|
14 |
||
15 |
//{{{ Chunk constructor |
|
72247 | 16 |
@@ -584,8 +584,8 @@ |
17 |
// this is either style.getBackgroundColor() or |
|
48786 | 18 |
// styles[defaultID].getBackgroundColor() |
19 |
private Color background; |
|
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
20 |
- private char[] chars; |
48786 | 21 |
- private String str; |
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
22 |
+ public char[] chars; |
48786 | 23 |
+ public String str; |
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
24 |
private GlyphData glyphData; |
50306 | 25 |
//}}} |
26 |
||
72247 | 27 |
diff -ru 5.6.0/jEdit-orig/org/gjt/sp/jedit/textarea/TextArea.java 5.6.0/jEdit-patched/org/gjt/sp/jedit/textarea/TextArea.java |
28 |
--- 5.6.0/jEdit-orig/org/gjt/sp/jedit/textarea/TextArea.java 2020-09-03 05:31:01.000000000 +0200 |
|
29 |
+++ 5.6.0/jEdit-patched/org/gjt/sp/jedit/textarea/TextArea.java 2020-09-08 20:13:23.569140077 +0200 |
|
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
30 |
@@ -914,6 +914,11 @@ |
61511 | 31 |
return chunkCache.getLineInfo(screenLine).physicalLine; |
32 |
} //}}} |
|
33 |
||
34 |
+ public Chunk getChunksOfScreenLine(int screenLine) |
|
35 |
+ { |
|
36 |
+ return chunkCache.getLineInfo(screenLine).chunks; |
|
37 |
+ } |
|
38 |
+ |
|
39 |
//{{{ getScreenLineOfOffset() method |
|
40 |
/** |
|
41 |
* Returns the screen (wrapped) line containing the specified offset. |
|
72247 | 42 |
diff -ru 5.6.0/jEdit-orig/org/gjt/sp/util/SyntaxUtilities.java 5.6.0/jEdit-patched/org/gjt/sp/util/SyntaxUtilities.java |
43 |
--- 5.6.0/jEdit-orig/org/gjt/sp/util/SyntaxUtilities.java 2020-09-03 05:31:09.000000000 +0200 |
|
44 |
+++ 5.6.0/jEdit-patched/org/gjt/sp/util/SyntaxUtilities.java 2020-09-08 20:13:23.569140077 +0200 |
|
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
45 |
@@ -344,8 +344,28 @@ |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
46 |
} |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
47 |
} |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
48 |
|
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
49 |
- return styles; |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
50 |
+ styles[0] = |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
51 |
+ new SyntaxStyle(org.gjt.sp.jedit.jEdit.getColorProperty("view.fgColor", Color.BLACK), |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
52 |
+ null, new Font(family, 0, size)); |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
53 |
+ return _styleExtender.extendStyles(styles); |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
54 |
} //}}} |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
55 |
|
48786 | 56 |
+ /** |
57 |
+ * Extended styles derived from the user-specified style array. |
|
58 |
+ */ |
|
59 |
+ |
|
60 |
+ public static class StyleExtender |
|
61 |
+ { |
|
62 |
+ public SyntaxStyle[] extendStyles(SyntaxStyle[] styles) |
|
63 |
+ { |
|
64 |
+ return styles; |
|
65 |
+ } |
|
66 |
+ } |
|
67 |
+ volatile private static StyleExtender _styleExtender = new StyleExtender(); |
|
68 |
+ public static void setStyleExtender(StyleExtender ext) |
|
69 |
+ { |
|
70 |
+ _styleExtender = ext; |
|
71 |
+ } |
|
72 |
+ |
|
73 |
private SyntaxUtilities(){} |
|
74 |
} |