mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-285414 VCS widget: exception for long branch name
GitOrigin-RevId: dfbef0c5bf97d5664ec6a8c2f118d3f039bf635a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e3fed6a5b5
commit
4f882c4485
@@ -102,8 +102,8 @@ private const val SHORTENED_END_PART = 8
|
||||
private fun cutText(value: String?): String? {
|
||||
if (value == null || value.length <= MAX_TEXT_LENGTH) return value
|
||||
|
||||
val beginRange = IntRange(0, SHORTENED_BEGIN_PART)
|
||||
val endRange = IntRange(value.length - SHORTENED_END_PART, value.length)
|
||||
val beginRange = IntRange(0, SHORTENED_BEGIN_PART - 1)
|
||||
val endRange = IntRange(value.length - SHORTENED_END_PART, value.length - 1)
|
||||
return value.substring(beginRange) + "..." + value.substring(endRange)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user