mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 10:01:39 -05:00
Fix #418
This commit is contained in:
parent
e9f6afeb9c
commit
96768f81f4
1 changed files with 7 additions and 3 deletions
|
@ -138,11 +138,15 @@ export function parse(keyseq: KeyEventLike[], map: KeyMap): ParserResponse {
|
|||
|
||||
/** True if seq1 is a prefix or equal to seq2 */
|
||||
function prefixes(seq1: KeyEventLike[], seq2: MinimalKey[]) {
|
||||
if (seq1.length > seq2.length) {
|
||||
return false
|
||||
} else {
|
||||
for (const [key1, key2] of izip(seq1, seq2)) {
|
||||
if (!key2.match(key1)) return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
/** returns the fragment of `map` that keyseq is a valid prefix of. */
|
||||
export function completions(keyseq: KeyEventLike[], map: KeyMap): KeyMap {
|
||||
|
|
Loading…
Add table
Reference in a new issue