author | wenzelm |
Wed, 06 Dec 2023 21:28:40 +0100 | |
changeset 79159 | 05cdedece5a9 |
parent 79012 | b6bca0666c38 |
child 80156 | 70d69b081561 |
permissions | -rw-r--r-- |
73653
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
1 |
diff -ru jedit5.6.0/jEdit/org/gjt/sp/jedit/syntax/Chunk.java jedit5.6.0-patched/jEdit/org/gjt/sp/jedit/syntax/Chunk.java |
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
2 |
--- jedit5.6.0/jEdit/org/gjt/sp/jedit/syntax/Chunk.java 2020-09-03 05:31:01.000000000 +0200 |
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
3 |
+++ jedit5.6.0-patched/jEdit/org/gjt/sp/jedit/syntax/Chunk.java 2021-05-10 11:02:05.816257745 +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 |
||
73653
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
27 |
diff -ru jedit5.6.0/jEdit/org/gjt/sp/jedit/textarea/TextArea.java jedit5.6.0-patched/jEdit/org/gjt/sp/jedit/textarea/TextArea.java |
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
28 |
--- jedit5.6.0/jEdit/org/gjt/sp/jedit/textarea/TextArea.java 2020-09-03 05:31:01.000000000 +0200 |
79012
b6bca0666c38
rebuild jedit with minimal patch for jdk-21, following SVN 25690;
wenzelm
parents:
73658
diff
changeset
|
29 |
+++ jedit5.6.0-patched/jEdit/org/gjt/sp/jedit/textarea/TextArea.java 2023-11-20 15:31:55.825519645 +0100 |
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. |
|
73658 | 42 |
@@ -1622,8 +1627,8 @@ |
43 |
} |
|
44 |
||
45 |
// Scan backwards, trying to find a bracket |
|
46 |
- String openBrackets = "([{«‹⟨⌈⌊⦇⟦⦃⟪"; |
|
47 |
- String closeBrackets = ")]}»›⟩⌉⌋⦈⟧⦄⟫"; |
|
48 |
+ String openBrackets = "([{«‹⟨⌈⌊⦇⟦⦃⟪⦉"; |
|
49 |
+ String closeBrackets = ")]}»›⟩⌉⌋⦈⟧⦄⟫⦊"; |
|
50 |
int count = 1; |
|
51 |
char openBracket = '\0'; |
|
52 |
char closeBracket = '\0'; |
|
79012
b6bca0666c38
rebuild jedit with minimal patch for jdk-21, following SVN 25690;
wenzelm
parents:
73658
diff
changeset
|
53 |
@@ -6336,7 +6341,7 @@ |
b6bca0666c38
rebuild jedit with minimal patch for jdk-21, following SVN 25690;
wenzelm
parents:
73658
diff
changeset
|
54 |
{ |
b6bca0666c38
rebuild jedit with minimal patch for jdk-21, following SVN 25690;
wenzelm
parents:
73658
diff
changeset
|
55 |
int following = charBreaker.following(offset - |
b6bca0666c38
rebuild jedit with minimal patch for jdk-21, following SVN 25690;
wenzelm
parents:
73658
diff
changeset
|
56 |
index0Offset); |
b6bca0666c38
rebuild jedit with minimal patch for jdk-21, following SVN 25690;
wenzelm
parents:
73658
diff
changeset
|
57 |
- if (following == BreakIterator.DONE) |
b6bca0666c38
rebuild jedit with minimal patch for jdk-21, following SVN 25690;
wenzelm
parents:
73658
diff
changeset
|
58 |
+ if (following == BreakIterator.DONE || (Runtime.version().feature() >= 20 && following == offset - index0Offset)) |
b6bca0666c38
rebuild jedit with minimal patch for jdk-21, following SVN 25690;
wenzelm
parents:
73658
diff
changeset
|
59 |
{ |
b6bca0666c38
rebuild jedit with minimal patch for jdk-21, following SVN 25690;
wenzelm
parents:
73658
diff
changeset
|
60 |
// This means a end of line. Then it is |
b6bca0666c38
rebuild jedit with minimal patch for jdk-21, following SVN 25690;
wenzelm
parents:
73658
diff
changeset
|
61 |
// safe to assume 1 code unit is a character. |
73658 | 62 |
diff -ru jedit5.6.0/jEdit/org/gjt/sp/jedit/TextUtilities.java jedit5.6.0-patched/jEdit/org/gjt/sp/jedit/TextUtilities.java |
63 |
--- jedit5.6.0/jEdit/org/gjt/sp/jedit/TextUtilities.java 2020-09-03 05:31:03.000000000 +0200 |
|
64 |
+++ jedit5.6.0-patched/jEdit/org/gjt/sp/jedit/TextUtilities.java 2021-05-10 18:20:57.418571547 +0200 |
|
65 |
@@ -115,6 +115,8 @@ |
|
66 |
case '⦄': if (direction != null) direction[0] = false; return '⦃'; |
|
67 |
case '⟪': if (direction != null) direction[0] = true; return '⟫'; |
|
68 |
case '⟫': if (direction != null) direction[0] = false; return '⟪'; |
|
69 |
+ case '⦉': if (direction != null) direction[0] = true; return '⦊'; |
|
70 |
+ case '⦊': if (direction != null) direction[0] = false; return '⦉'; |
|
71 |
default: return '\0'; |
|
72 |
} |
|
73 |
} //}}} |
|
73653
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
74 |
diff -ru jedit5.6.0/jEdit/org/gjt/sp/util/SyntaxUtilities.java jedit5.6.0-patched/jEdit/org/gjt/sp/util/SyntaxUtilities.java |
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
75 |
--- jedit5.6.0/jEdit/org/gjt/sp/util/SyntaxUtilities.java 2020-09-03 05:31:09.000000000 +0200 |
d9823224fcfe
build auxiliary jEdit component in Isabelle/Scala;
wenzelm
parents:
72247
diff
changeset
|
76 |
+++ jedit5.6.0-patched/jEdit/org/gjt/sp/util/SyntaxUtilities.java 2021-05-10 11:02:05.820257742 +0200 |
71932
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
77 |
@@ -344,8 +344,28 @@ |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
78 |
} |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
79 |
} |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
80 |
|
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
81 |
- return styles; |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
82 |
+ styles[0] = |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
83 |
+ 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
|
84 |
+ null, new Font(family, 0, size)); |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
85 |
+ return _styleExtender.extendStyles(styles); |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
86 |
} //}}} |
65fd0f032a75
updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents:
69838
diff
changeset
|
87 |
|
48786 | 88 |
+ /** |
89 |
+ * Extended styles derived from the user-specified style array. |
|
90 |
+ */ |
|
91 |
+ |
|
92 |
+ public static class StyleExtender |
|
93 |
+ { |
|
94 |
+ public SyntaxStyle[] extendStyles(SyntaxStyle[] styles) |
|
95 |
+ { |
|
96 |
+ return styles; |
|
97 |
+ } |
|
98 |
+ } |
|
99 |
+ volatile private static StyleExtender _styleExtender = new StyleExtender(); |
|
100 |
+ public static void setStyleExtender(StyleExtender ext) |
|
101 |
+ { |
|
102 |
+ _styleExtender = ext; |
|
103 |
+ } |
|
104 |
+ |
|
105 |
private SyntaxUtilities(){} |
|
106 |
} |