1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-05-23 04:34:03 +02:00

Add a default size for the digraph string builder

This commit is contained in:
Matt Ellis 2024-09-03 13:51:25 +01:00 committed by Alex Pláte
parent 5c7edc498f
commit 01d00d45d8

View File

@ -110,7 +110,9 @@ open class VimDigraphGroupBase() : VimDigraphGroup {
logger.debug("height=$height")
}
val output = buildString {
val digraphCount = defaultDigraphs.size / 3
val capacity = (digraphCount * columnWidth) + (digraphCount / columnCount) // Text + newlines
val output = buildString(capacity) {
var column = 0
// We cannot guarantee ordering with the dictionaries, so let's use the defaultDigraphs list