Skip to content

Commit d9003a3

Browse files
fix: conflict
2 parents 1a94c87 + 25caf3e commit d9003a3

File tree

60 files changed

+1488
-471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1488
-471
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323

2424
- name: Checkout Repository
2525
uses: actions/checkout@v4
26+
with:
27+
submodules: true
2628

2729
- name: Set up JDK 17
2830
uses: actions/setup-java@v4

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "oniguruma-native/src/main/cpp/oniguruma"]
2+
path = oniguruma-native/src/main/cpp/oniguruma
3+
url = git@github.com:kkos/oniguruma.git

app/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ dependencies {
9797
implementation(projects.languageMonarch)
9898
implementation(projects.editorLsp)
9999
implementation(projects.languageTreesitter)
100+
implementation(projects.onigurumaNative)
100101

101102
// Tree-sitter languages
102103
implementation(libs.tree.sitter.java)

editor/src/main/java/io/github/rosemoe/sora/graphics/GraphemeBoundsBreaker.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,16 @@
2323
*/
2424
package io.github.rosemoe.sora.graphics;
2525

26-
26+
/**
27+
* Utility for breaking text by grapheme bounds
28+
*
29+
* @author Rosemoe
30+
*/
2731
public class GraphemeBoundsBreaker {
2832

33+
/**
34+
* Find next grapheme break point before the given width
35+
*/
2936
public static int findGraphemeBreakPoint(float[] advances, int length, int width, int start) {
3037
float currentWidth = 0;
3138
int next = start;

editor/src/main/java/io/github/rosemoe/sora/graphics/GraphicsCompat.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public class GraphicsCompat {
3333

3434
/**
3535
* {@link Canvas#drawTextRun(char[], int, int, int, int, float, float, boolean, android.graphics.Paint)} is also available on API 21 & 22,
36-
* but with hidden access. As there is no hidden list checks in those API platforms, it's safe here to call the "New API".
36+
* but with hidden access.
37+
* As there is no hidden list checks in those API platforms, it's safe here to call the "New API".
3738
*/
3839
@SuppressLint("NewApi")
3940
public static void drawTextRun(Canvas canvas, @NonNull char[] text, int index, int count, int contextIndex,

0 commit comments

Comments
 (0)