mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Add shift-tab bind for completion
This commit is contained in:
parent
535c79532b
commit
a76f052042
1 changed files with 7 additions and 4 deletions
|
@ -55,10 +55,14 @@ export abstract class CompletionSource {
|
|||
return this._state
|
||||
}
|
||||
|
||||
next(forward = true): boolean {
|
||||
next(inc = 1): boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
prev(inc = 1): boolean {
|
||||
return this.next(-1*inc)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Default classes
|
||||
|
@ -294,17 +298,16 @@ abstract class CompletionSourceFuse extends CompletionSource {
|
|||
/* console.log('results', result1, res2) */
|
||||
}
|
||||
|
||||
next(forward=true){
|
||||
next(inc=1){
|
||||
if (this.state != "hidden"){
|
||||
let visopts = this.options.filter((o) => o.state != "hidden")
|
||||
let currind = visopts.findIndex((o) => o.state == "focused")
|
||||
this.deselect()
|
||||
this.select(visopts[currind + 1])
|
||||
this.select(visopts[currind + inc])
|
||||
return true
|
||||
} else return false
|
||||
}
|
||||
|
||||
prev = () => this.next(false)
|
||||
}
|
||||
|
||||
// }}}
|
||||
|
|
Loading…
Add table
Reference in a new issue