Skip to content

Commit 2e1efb1

Browse files
Re-order >>>= and >>> so one does not shadow the other
1 parent b0ad64f commit 2e1efb1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

editor/src/main/java/com/itsaky/androidide/editor/utils/OperatorSelection.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,18 @@ import io.github.rosemoe.sora.text.Content
2121

2222
/**
2323
* Java/Kotlin operators for long-press selection, ordered by length descending
24-
* so longer matches are tried first (e.g. `>>>` before `>>` before `>`).
24+
* so longer matches are tried first (e.g. `>>>=` before `>>>` before `>>` before `>`).
2525
*/
2626
private val OPERATORS: List<String> =
2727
listOf(
28+
// 4-char (`>>>=` must precede `>>>` — the latter is a prefix)
29+
">>>=",
2830
// 3-char (=== and !== before 2-char == and !=)
2931
"===",
3032
"!==",
3133
">>>",
3234
"<<=",
3335
">>=",
34-
">>>=",
3536
// 2-char
3637
"==",
3738
"!=",

0 commit comments

Comments
 (0)