(overrides: KeymapOverrides, actionId: KeymapId)
| 126 | } |
| 127 | |
| 128 | function paneMapBindings(overrides: KeymapOverrides, actionId: KeymapId): string[] { |
| 129 | const prefixBinding = toVimSequence(getKeymapBinding(overrides, 'vim.panePrefix')) |
| 130 | const actionBinding = toVimSequence(getKeymapBinding(overrides, actionId)) |
| 131 | if (!prefixBinding || !actionBinding) return [] |
| 132 | const bindings = [`${prefixBinding}${actionBinding}`] |
| 133 | const prefixTokens = getSequenceTokens(overrides, 'vim.panePrefix') |
| 134 | const actionTokens = getSequenceTokens(overrides, actionId) |
| 135 | if ( |
| 136 | prefixTokens.length === 1 && |
| 137 | prefixTokens[0] === 'Ctrl+W' && |
| 138 | actionTokens.length === 1 && |
| 139 | /^[hjkl]$/i.test(actionTokens[0]) |
| 140 | ) { |
| 141 | bindings.push(`${prefixBinding}<C-${actionTokens[0].toLowerCase()}>`) |
| 142 | } |
| 143 | return [...new Set(bindings)] |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * Clamped half-page scroll for the editor, bound to Ctrl+D / Ctrl+U. |
no test coverage detected