diff options
Diffstat (limited to 'src/main/kotlin/features/macros')
| -rw-r--r-- | src/main/kotlin/features/macros/KeyComboTrie.kt | 10 | ||||
| -rw-r--r-- | src/main/kotlin/features/macros/MacroUI.kt | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/main/kotlin/features/macros/KeyComboTrie.kt b/src/main/kotlin/features/macros/KeyComboTrie.kt index 48ec57c..1983b2e 100644 --- a/src/main/kotlin/features/macros/KeyComboTrie.kt +++ b/src/main/kotlin/features/macros/KeyComboTrie.kt @@ -15,15 +15,15 @@ sealed interface KeyComboTrie { val root = Branch(mutableMapOf()) for (combo in combos) { var p = root - if (combo.keys.isEmpty()) { + if (combo.keySequence.isEmpty()) { ErrorUtil.softUserError("Key Combo for ${combo.action.label.string} is empty") continue } - for ((index, key) in combo.keys.withIndex()) { + for ((index, key) in combo.keySequence.withIndex()) { val m = (p.nodes as MutableMap) - if (index == combo.keys.lastIndex) { + if (index == combo.keySequence.lastIndex) { if (key in m) { - ErrorUtil.softUserError("Overlapping actions found for ${combo.keys.joinToString(" > ")} (another action ${m[key]} already exists).") + ErrorUtil.softUserError("Overlapping actions found for ${combo.keySequence.joinToString(" > ")} (another action ${m[key]} already exists).") break } @@ -31,7 +31,7 @@ sealed interface KeyComboTrie { } else { val c = m.getOrPut(key) { Branch(mutableMapOf()) } if (c !is Branch) { - ErrorUtil.softUserError("Overlapping actions found for ${combo.keys} (final node exists at index $index) through another action already") + ErrorUtil.softUserError("Overlapping actions found for ${combo.keySequence} (final node exists at index $index) through another action already") break } else { p = c diff --git a/src/main/kotlin/features/macros/MacroUI.kt b/src/main/kotlin/features/macros/MacroUI.kt index 09390fe..869466d 100644 --- a/src/main/kotlin/features/macros/MacroUI.kt +++ b/src/main/kotlin/features/macros/MacroUI.kt @@ -255,7 +255,7 @@ class MacroUI { fun commandR() = StructuredText.of(command) @field:Bind("combo") - val combo = action.keys.map { KeyBindingEditor(it, this) }.toObservableList() + val combo = action.keySequence.map { KeyBindingEditor(it, this) }.toObservableList() @Bind fun formattedCombo() = |
