mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
Web Symbols: fix IOB exception
(cherry picked from commit 4b3b8e0c316b40fd870ea43d7d06cdd2a8c46b2a) IJ-CR-151473 GitOrigin-RevId: 1e9b97602b3671857c2e13755e49866ebebafa80
This commit is contained in:
committed by
intellij-monorepo-bot
parent
be045e02bd
commit
43c65f02c8
@@ -75,7 +75,7 @@ internal const val SPECIAL_MATCHED_CONTRIB = "\$special$"
|
||||
|
||||
internal fun getPatternCompletablePrefix(pattern: String?): String {
|
||||
if (pattern == null || pattern.contains('|')) return ""
|
||||
for (i in 0..pattern.length) {
|
||||
for (i in 0 until pattern.length) {
|
||||
val char = pattern[i]
|
||||
if (SPECIAL_CHARS.contains(char)) {
|
||||
return pattern.substring(0 until i)
|
||||
@@ -138,4 +138,4 @@ internal fun WebSymbolNameSegment.isEmpty() =
|
||||
|
||||
internal fun MatchResult.prefixedWith(prevResult: MatchResult?): MatchResult =
|
||||
prevResult?.let { MatchResult(it.segments + this.segments) }
|
||||
?: this
|
||||
?: this
|
||||
|
||||
Reference in New Issue
Block a user